/*
 * TkwdscorepointView.java
 */
package it.iubar.tkdscore;

import it.iubar.swing.Config;
import it.iubar.tkdscore.jinput.JInputUtils;
import it.iubar.tkdscore.jinput.TestController;
import it.iubar.tkdscore.lwjgl.Example1;
import it.iubar.tkdscore.usb.libusbjava.LogBus;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jdesktop.application.Action;
import org.jdesktop.application.ResourceMap;
import org.jdesktop.application.SingleFrameApplication;
import org.jdesktop.application.FrameView;
import org.jdesktop.application.TaskMonitor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import java.util.Random;
import java.util.Set;
import javax.swing.BorderFactory;
import javax.swing.DefaultListModel;
import javax.swing.Timer;
import javax.swing.Icon;
import javax.swing.JColorChooser;
import javax.swing.JComboBox;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import net.java.games.input.Component;
import net.java.games.input.Component.Identifier.Key;
import net.java.games.input.Controller;
import net.java.games.input.Controller.Type;
import net.java.games.input.ControllerEnvironment;
import net.java.games.input.Keyboard;

//    private void test() {
//        TkdGlobal.showInfo("Starting test");
//        ControllerEnvironment env = ControllerEnvironment.getDefaultEnvironment();
//        Keyboard kb = null;
//        for (Controller c : env.getControllers()) {
//            if (c instanceof Keyboard) {
//                kb = (Keyboard) c;
//            }
//        }
//        for (int i = 0; i < 100; i++) {
//            kb.poll();
//            if (kb.isKeyDown(Key.A)) {
//                TkdGlobal.showInfo("BINGO!!!");
//            }
//            try {
//                Thread.sleep(100);
//            } catch (InterruptedException ex) {
//                return;
//            }
//        }
//        TkdGlobal.showInfo("End of test");
//    }
/**
 * The application's main frame.
 */
public class TkdScoreView extends FrameView {

    private Clock2 clock = null;
    private final static String NEWLINE = "\r\n";
    public static final int STATUS_STOPPED = 1;
    public static final int STATUS_FIGHTING = 2;
    public static final int STATUS_BREAKTIME = 3;
    public static final int STATUS_RESETTED = 4;
    ArrayList fields = new ArrayList();
    ArrayList combos = new ArrayList();
    ArrayList labels = new ArrayList();
    ArrayList keylabels = new ArrayList();
    static final org.jdesktop.application.ResourceMap my_resourceMap = org.jdesktop.application.Application.getInstance(it.iubar.tkdscore.TkdScoreApp.class).getContext().getResourceMap(TkdScoreView.class);
    private HashMap mapRefereeHw = null;
    private HashMap mapController = null;
    //private List timeline = new ArrayList();
    private List redQueue = null;
    private List blueQueue = null;
    private int referees_count = 0;
    private int interim_num = 0;
    private static final int DEF_CLOCK_FONT_SIZE = 48;

    public TkdScoreView(SingleFrameApplication app) {
        super(app);

        initComponents();
        myInit();

        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setText("");
            }
        });
        messageTimer.setRepeats(false);
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(false);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
        taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() {

            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                String propertyName = evt.getPropertyName();
                if ("started".equals(propertyName)) {
                    if (!busyIconTimer.isRunning()) {
                        statusAnimationLabel.setIcon(busyIcons[0]);
                        busyIconIndex = 0;
                        busyIconTimer.start();
                    }
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(true);
                } else if ("done".equals(propertyName)) {
                    busyIconTimer.stop();
                    statusAnimationLabel.setIcon(idleIcon);
                    progressBar.setVisible(false);
                    progressBar.setValue(0);
                } else if ("message".equals(propertyName)) {
                    String text = (String) (evt.getNewValue());
                    statusMessageLabel.setText((text == null) ? "" : text);
                    messageTimer.restart();
                } else if ("progress".equals(propertyName)) {
                    int value = (Integer) (evt.getNewValue());
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(false);
                    progressBar.setValue(value);
                }
            }
        });
    }

    @Action
    public void showAboutBox() {
        if (aboutBox == null) {
            JFrame mainFrame = TkdScoreApp.getApplication().getMainFrame();
            aboutBox = new TkdScoreAboutBox(mainFrame);
            aboutBox.setLocationRelativeTo(mainFrame);
        }
        TkdScoreApp.getApplication().show(aboutBox);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        mainPanel = new javax.swing.JPanel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanelConfig = new javax.swing.JPanel();
        jToolBar2 = new javax.swing.JToolBar();
        jButtonLoadConfig = new javax.swing.JButton();
        jButtonSaveConfig = new javax.swing.JButton();
        jButtonApplyConfig = new javax.swing.JButton();
        jButtonResetConfig = new javax.swing.JButton();
        jPanelConfigCenter = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jPanel7 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jTextFieldRoundTimeMm = new javax.swing.JTextField();
        jLabel24 = new javax.swing.JLabel();
        jTextFieldMatchName = new javax.swing.JTextField();
        jLabel39 = new javax.swing.JLabel();
        jTextFieldRoundCurrTimeSs = new javax.swing.JTextField();
        jTextFieldRoundCurrTimeMm = new javax.swing.JTextField();
        jLabel42 = new javax.swing.JLabel();
        jLabel47 = new javax.swing.JLabel();
        jLabel49 = new javax.swing.JLabel();
        jTextFieldBreakTime = new javax.swing.JTextField();
        jTextFieldRoundTimeSs = new javax.swing.JTextField();
        jLabel51 = new javax.swing.JLabel();
        jLabel52 = new javax.swing.JLabel();
        jTextFieldBreakTime1 = new javax.swing.JTextField();
        jLabel53 = new javax.swing.JLabel();
        jLabel54 = new javax.swing.JLabel();
        jPanel15 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel63 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jTextFieldCurrRound = new javax.swing.JTextField();
        jTextFieldLeadPoints = new javax.swing.JTextField();
        jLabel64 = new javax.swing.JLabel();
        jTextFieldRounds = new javax.swing.JTextField();
        jTextFieldMaxPoints = new javax.swing.JTextField();
        jTextFieldMatchId = new javax.swing.JTextField();
        jLabel41 = new javax.swing.JLabel();
        jPanel8 = new javax.swing.JPanel();
        jLabel40 = new javax.swing.JLabel();
        jTextFieldSleepTime = new javax.swing.JTextField();
        jLabel50 = new javax.swing.JLabel();
        jPanel9 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jTextFieldJudges = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jTextFieldValidityTime = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        jLabel59 = new javax.swing.JLabel();
        jLabel60 = new javax.swing.JLabel();
        jTextFieldValidityTime1 = new javax.swing.JTextField();
        jLabel61 = new javax.swing.JLabel();
        jTextFieldJudges1 = new javax.swing.JTextField();
        jPanel12 = new javax.swing.JPanel();
        jLabel38 = new javax.swing.JLabel();
        jTextFieldBackground1 = new javax.swing.JTextField();
        jButtonBoardColor = new javax.swing.JButton();
        jCheckBox1 = new javax.swing.JCheckBox();
        jLabel57 = new javax.swing.JLabel();
        jTextFieldBackground2 = new javax.swing.JTextField();
        jLabel55 = new javax.swing.JLabel();
        jComboBox1 = new javax.swing.JComboBox();
        jButtonBoardColor1 = new javax.swing.JButton();
        jLabel56 = new javax.swing.JLabel();
        jLabel58 = new javax.swing.JLabel();
        jTextFieldBackground3 = new javax.swing.JTextField();
        jTextFieldBackground4 = new javax.swing.JTextField();
        jButtonBoardColor2 = new javax.swing.JButton();
        jButtonBoardColor3 = new javax.swing.JButton();
        jLabel62 = new javax.swing.JLabel();
        jTextFieldClockFontSize = new javax.swing.JTextField();
        jPanelScore = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jPanel14 = new javax.swing.JPanel();
        jLabel65 = new javax.swing.JLabel();
        jLabel66 = new javax.swing.JLabel();
        jTextFieldBlue1 = new javax.swing.JTextField();
        jTextFieldRed1 = new javax.swing.JTextField();
        jLabel67 = new javax.swing.JLabel();
        jLabel68 = new javax.swing.JLabel();
        jTextFieldBlueName = new javax.swing.JTextField();
        jTextFieldRedName = new javax.swing.JTextField();
        jLabel69 = new javax.swing.JLabel();
        jLabel70 = new javax.swing.JLabel();
        jTextFieldBluePenality1 = new javax.swing.JTextField();
        jTextFieldBluePenality2 = new javax.swing.JTextField();
        jLabel71 = new javax.swing.JLabel();
        jLabel72 = new javax.swing.JLabel();
        jTextFieldRedPenality1 = new javax.swing.JTextField();
        jTextFieldRedPenality2 = new javax.swing.JTextField();
        jLabel73 = new javax.swing.JLabel();
        jLabel74 = new javax.swing.JLabel();
        jTextFieldRed2 = new javax.swing.JTextField();
        jTextFieldBlue2 = new javax.swing.JTextField();
        jToolBar5 = new javax.swing.JToolBar();
        jButtonClearBoard = new javax.swing.JButton();
        jButtonRandomBoard = new javax.swing.JButton();
        jButtonStartMatch = new javax.swing.JButton();
        jButtonPauseMatch = new javax.swing.JButton();
        jButtonStopMatch = new javax.swing.JButton();
        jButtonResetMatch = new javax.swing.JButton();
        jPanelBoard = new javax.swing.JPanel();
        jPanelBoardCenter = new javax.swing.JPanel();
        jPanelBoardScoreTop = new javax.swing.JPanel();
        jLabelMatchName = new javax.swing.JLabel();
        jPanelBoardScore = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jLabelRedPoint = new javax.swing.JLabel();
        jLabelRedName = new javax.swing.JLabel();
        jLabelRedPenality = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        jLabelBluePoint = new javax.swing.JLabel();
        jLabelBlueName = new javax.swing.JLabel();
        jLabelBluePenality = new javax.swing.JLabel();
        jPanelBoardScoreSouth = new javax.swing.JPanel();
        jLabelRound = new javax.swing.JLabel();
        jLabelTime = new javax.swing.JLabel();
        jPanelTimer = new javax.swing.JPanel();
        jToolBar3 = new javax.swing.JToolBar();
        jButtonStartTimer = new javax.swing.JButton();
        jButtonPauseTimer = new javax.swing.JButton();
        jButtonStopTimer = new javax.swing.JButton();
        jButtonResetTimer = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jPanelClock = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        jPanelRing2 = new javax.swing.JPanel();
        jPanelRing2Center = new javax.swing.JPanel();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jLabelR2Icon = new javax.swing.JLabel();
        jLabelR1Icon = new javax.swing.JLabel();
        jLabelR3Icon = new javax.swing.JLabel();
        jLabelR4Icon = new javax.swing.JLabel();
        jPanelLogs = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jTextArea2 = new javax.swing.JTextArea();
        jToolBar1 = new javax.swing.JToolBar();
        jButton3 = new javax.swing.JButton();
        jButton12 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jPanelDiag = new javax.swing.JPanel();
        jToolBar4 = new javax.swing.JToolBar();
        jButtonHwDetect = new javax.swing.JButton();
        jButtonHwTest = new javax.swing.JButton();
        jButtonStartWorker = new javax.swing.JButton();
        jButtonStopWorker = new javax.swing.JButton();
        jPanelDiagCenter = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        jTextFieldJ2 = new javax.swing.JTextField();
        jTextFieldJ1 = new javax.swing.JTextField();
        jTextFieldJ3 = new javax.swing.JTextField();
        jTextFieldJ4 = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jComboBoxJ1 = new javax.swing.JComboBox();
        jComboBoxJ2 = new javax.swing.JComboBox();
        jComboBoxJ3 = new javax.swing.JComboBox();
        jComboBoxJ4 = new javax.swing.JComboBox();
        jLabelJ3 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jLabelJ1 = new javax.swing.JLabel();
        jLabelJ2 = new javax.swing.JLabel();
        jLabelJ4 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        jTextFieldR2 = new javax.swing.JTextField();
        jTextFieldR1 = new javax.swing.JTextField();
        jTextFieldR3 = new javax.swing.JTextField();
        jTextFieldR4 = new javax.swing.JTextField();
        jLabel43 = new javax.swing.JLabel();
        jLabel44 = new javax.swing.JLabel();
        jLabel45 = new javax.swing.JLabel();
        jLabel46 = new javax.swing.JLabel();
        jLabelR3 = new javax.swing.JLabel();
        jLabel48 = new javax.swing.JLabel();
        jLabelR1 = new javax.swing.JLabel();
        jLabelR2 = new javax.swing.JLabel();
        jLabelR4 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jList1 = new javax.swing.JList();
        jPanel13 = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jTextFieldShort1 = new javax.swing.JTextField();
        jTextFieldShort2 = new javax.swing.JTextField();
        jTextFieldShort3 = new javax.swing.JTextField();
        jTextFieldShort4 = new javax.swing.JTextField();
        jPanelAbout = new javax.swing.JPanel();
        jLabel9 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        rLinkLabel1 = new it.iubar.swing.beans.simple.RLinkLabel();
        rLinkLabel2 = new it.iubar.swing.beans.simple.RLinkLabel();
        jLabel16 = new javax.swing.JLabel();
        javax.swing.JLabel appTitleLabel = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        rLinkLabel3 = new it.iubar.swing.beans.simple.RLinkLabel();
        rLinkLabel4 = new it.iubar.swing.beans.simple.RLinkLabel();
        javax.swing.JLabel imageLabel = new javax.swing.JLabel();
        rLinkLabel5 = new it.iubar.swing.beans.simple.RLinkLabel();
        jLabel28 = new javax.swing.JLabel();
        rLinkLabel6 = new it.iubar.swing.beans.simple.RLinkLabel();
        menuBar = new javax.swing.JMenuBar();
        javax.swing.JMenu fileMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
        javax.swing.JMenu helpMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();
        progressBar = new javax.swing.JProgressBar();
        buttonGroup1 = new javax.swing.ButtonGroup();

        mainPanel.setName("mainPanel"); // NOI18N
        mainPanel.setLayout(new javax.swing.BoxLayout(mainPanel, javax.swing.BoxLayout.LINE_AXIS));

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanelConfig.setName("jPanelConfig"); // NOI18N
        jPanelConfig.setLayout(new java.awt.BorderLayout());

        jToolBar2.setFloatable(false);
        jToolBar2.setRollover(true);
        jToolBar2.setName("jToolBar2"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(it.iubar.tkdscore.TkdScoreApp.class).getContext().getResourceMap(TkdScoreView.class);
        jButtonLoadConfig.setIcon(resourceMap.getIcon("jButtonUpdate.icon")); // NOI18N
        jButtonLoadConfig.setText(resourceMap.getString("jButtonUpdate.text")); // NOI18N
        jButtonLoadConfig.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonLoadConfig.setName("jButtonUpdate"); // NOI18N
        jButtonLoadConfig.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonLoadConfig.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonLoadConfigActionPerformed(evt);
            }
        });
        jToolBar2.add(jButtonLoadConfig);

        jButtonSaveConfig.setIcon(resourceMap.getIcon("jButtonSaveConfig.icon")); // NOI18N
        jButtonSaveConfig.setText(resourceMap.getString("jButtonSaveConfig.text")); // NOI18N
        jButtonSaveConfig.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonSaveConfig.setName("jButtonSaveConfig"); // NOI18N
        jButtonSaveConfig.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonSaveConfig.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSaveConfigActionPerformed(evt);
            }
        });
        jToolBar2.add(jButtonSaveConfig);

        jButtonApplyConfig.setIcon(resourceMap.getIcon("jButtonApplyConfig.icon")); // NOI18N
        jButtonApplyConfig.setText(resourceMap.getString("jButtonApplyConfig.text")); // NOI18N
        jButtonApplyConfig.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonApplyConfig.setName("jButtonApplyConfig"); // NOI18N
        jButtonApplyConfig.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonApplyConfig.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonApplyConfigActionPerformed(evt);
            }
        });
        jToolBar2.add(jButtonApplyConfig);

        jButtonResetConfig.setIcon(resourceMap.getIcon("jButtonResetConfig.icon")); // NOI18N
        jButtonResetConfig.setText(resourceMap.getString("jButtonResetConfig.text")); // NOI18N
        jButtonResetConfig.setFocusable(false);
        jButtonResetConfig.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonResetConfig.setName("jButtonResetConfig"); // NOI18N
        jButtonResetConfig.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonResetConfig.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonResetConfigActionPerformed(evt);
            }
        });
        jToolBar2.add(jButtonResetConfig);

        jPanelConfig.add(jToolBar2, java.awt.BorderLayout.SOUTH);

        jPanelConfigCenter.setName("jPanelConfigCenter"); // NOI18N

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel5.border.title"))); // NOI18N
        jPanel5.setName("jPanel5"); // NOI18N

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 379, Short.MAX_VALUE)
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 208, Short.MAX_VALUE)
        );

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel7.border.title"))); // NOI18N
        jPanel7.setName("jPanel7"); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jTextFieldRoundTimeMm.setName("jTextFieldRoundTimeMm"); // NOI18N
        jTextFieldRoundTimeMm.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
        jLabel24.setName("jLabel24"); // NOI18N

        jTextFieldMatchName.setName("jTextFieldMatchName"); // NOI18N

        jLabel39.setText(resourceMap.getString("jLabel39.text")); // NOI18N
        jLabel39.setName("jLabel39"); // NOI18N

        jTextFieldRoundCurrTimeSs.setName("jTextFieldRoundCurrTimeSs"); // NOI18N
        jTextFieldRoundCurrTimeSs.setPreferredSize(new java.awt.Dimension(40, 20));

        jTextFieldRoundCurrTimeMm.setName("jTextFieldRoundCurrTimeMm"); // NOI18N
        jTextFieldRoundCurrTimeMm.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel42.setText(resourceMap.getString("jLabel42.text")); // NOI18N
        jLabel42.setName("jLabel42"); // NOI18N

        jLabel47.setText(resourceMap.getString("jLabel47.text")); // NOI18N
        jLabel47.setName("jLabel47"); // NOI18N

        jLabel49.setText(resourceMap.getString("jLabel49.text")); // NOI18N
        jLabel49.setName("jLabel49"); // NOI18N

        jTextFieldBreakTime.setName("jTextFieldBreakTime"); // NOI18N
        jTextFieldBreakTime.setPreferredSize(new java.awt.Dimension(40, 20));

        jTextFieldRoundTimeSs.setName("jTextFieldRoundTimeSs"); // NOI18N
        jTextFieldRoundTimeSs.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel51.setText(resourceMap.getString("jLabel51.text")); // NOI18N
        jLabel51.setName("jLabel51"); // NOI18N

        jLabel52.setText(resourceMap.getString("jLabel52.text")); // NOI18N
        jLabel52.setName("jLabel52"); // NOI18N

        jTextFieldBreakTime1.setName("jTextFieldBreakTime1"); // NOI18N
        jTextFieldBreakTime1.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel53.setText(resourceMap.getString("jLabel53.text")); // NOI18N
        jLabel53.setName("jLabel53"); // NOI18N

        jLabel54.setText(resourceMap.getString("jLabel54.text")); // NOI18N
        jLabel54.setName("jLabel54"); // NOI18N

        jPanel15.setName("jPanel15"); // NOI18N

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jLabel63.setText(resourceMap.getString("jLabel63.text")); // NOI18N
        jLabel63.setName("jLabel63"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        jTextFieldCurrRound.setName("jTextFieldCurrRound"); // NOI18N
        jTextFieldCurrRound.setPreferredSize(new java.awt.Dimension(40, 20));

        jTextFieldLeadPoints.setName("jTextFieldLeadPoints"); // NOI18N
        jTextFieldLeadPoints.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel64.setText(resourceMap.getString("jLabel64.text")); // NOI18N
        jLabel64.setName("jLabel64"); // NOI18N

        jTextFieldRounds.setName("jTextFieldRounds"); // NOI18N
        jTextFieldRounds.setPreferredSize(new java.awt.Dimension(40, 20));

        jTextFieldMaxPoints.setName("jTextFieldMaxPoints"); // NOI18N
        jTextFieldMaxPoints.setPreferredSize(new java.awt.Dimension(40, 20));

        jTextFieldMatchId.setEnabled(false);
        jTextFieldMatchId.setName("jTextFieldMatchId"); // NOI18N
        jTextFieldMatchId.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel41.setText(resourceMap.getString("jLabel41.text")); // NOI18N
        jLabel41.setName("jLabel41"); // NOI18N

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addComponent(jLabel64)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 47, Short.MAX_VALUE)
                        .addComponent(jTextFieldMaxPoints, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()
                        .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addGroup(jPanel15Layout.createSequentialGroup()
                                    .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jLabel5)
                                        .addComponent(jLabel3))
                                    .addGap(32, 32, 32))
                                .addComponent(jLabel41, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jLabel63))
                        .addGap(31, 31, 31)
                        .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jTextFieldRounds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jTextFieldMatchId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jTextFieldCurrRound, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jTextFieldLeadPoints, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(jTextFieldMatchId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jTextFieldRounds, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel41)
                    .addComponent(jTextFieldCurrRound, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel63)
                    .addComponent(jTextFieldLeadPoints, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel64)
                    .addComponent(jTextFieldMaxPoints, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(17, 17, 17))
        );

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(45, 45, 45)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel39)
                    .addComponent(jLabel49)
                    .addComponent(jLabel6)
                    .addComponent(jLabel24))
                .addGap(22, 22, 22)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jTextFieldRoundCurrTimeMm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel47)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldRoundCurrTimeSs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel54))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jTextFieldRoundTimeMm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel51)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldRoundTimeSs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel52))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(jTextFieldBreakTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel53)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldBreakTime1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel42))
                    .addComponent(jTextFieldMatchName, javax.swing.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE))
                .addGap(97, 97, 97))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGap(44, 44, 44)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jTextFieldMatchName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel24))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jTextFieldRoundTimeMm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel51)
                            .addComponent(jTextFieldRoundTimeSs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel52)
                            .addComponent(jLabel6))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jTextFieldBreakTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel53)
                            .addComponent(jTextFieldBreakTime1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel42)
                            .addComponent(jLabel49))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jTextFieldRoundCurrTimeMm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel47)
                            .addComponent(jTextFieldRoundCurrTimeSs, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel54)
                            .addComponent(jLabel39)))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(12, Short.MAX_VALUE))
        );

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel8.border.title"))); // NOI18N
        jPanel8.setName("jPanel8"); // NOI18N

        jLabel40.setText(resourceMap.getString("jLabel40.text")); // NOI18N
        jLabel40.setName("jLabel40"); // NOI18N

        jTextFieldSleepTime.setEnabled(false);
        jTextFieldSleepTime.setName("jTextFieldSleepTime"); // NOI18N
        jTextFieldSleepTime.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel50.setText(resourceMap.getString("jLabel50.text")); // NOI18N
        jLabel50.setName("jLabel50"); // NOI18N

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel40)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTextFieldSleepTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel50)
                .addContainerGap(18, Short.MAX_VALUE))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldSleepTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel50)
                    .addComponent(jLabel40))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel9.border.title"))); // NOI18N
        jPanel9.setName("jPanel9"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jTextFieldJudges.setName("jTextFieldJudges"); // NOI18N
        jTextFieldJudges.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jTextFieldValidityTime.setName("jTextFieldValidityTime"); // NOI18N
        jTextFieldValidityTime.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
        jLabel23.setName("jLabel23"); // NOI18N

        jLabel59.setText(resourceMap.getString("jLabel59.text")); // NOI18N
        jLabel59.setName("jLabel59"); // NOI18N

        jLabel60.setText(resourceMap.getString("jLabel60.text")); // NOI18N
        jLabel60.setName("jLabel60"); // NOI18N

        jTextFieldValidityTime1.setEnabled(false);
        jTextFieldValidityTime1.setName("jTextFieldValidityTime1"); // NOI18N
        jTextFieldValidityTime1.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel61.setText(resourceMap.getString("jLabel61.text")); // NOI18N
        jLabel61.setName("jLabel61"); // NOI18N

        jTextFieldJudges1.setName("jTextFieldJudges1"); // NOI18N
        jTextFieldJudges1.setPreferredSize(new java.awt.Dimension(40, 20));

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel8)
                    .addComponent(jLabel61))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldJudges, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldJudges1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(45, 45, 45)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7)
                    .addComponent(jLabel59))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldValidityTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldValidityTime1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel23)
                    .addComponent(jLabel60)))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(jTextFieldJudges, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(jTextFieldValidityTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel23))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel59)
                    .addComponent(jTextFieldJudges1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel61)
                    .addComponent(jTextFieldValidityTime1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel60)))
        );

        jLabel7.getAccessibleContext().setAccessibleName(resourceMap.getString("jLabel7.AccessibleContext.accessibleName")); // NOI18N

        jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel12.border.title"))); // NOI18N
        jPanel12.setName("jPanel12"); // NOI18N

        jLabel38.setText(resourceMap.getString("jLabel38.text")); // NOI18N
        jLabel38.setName("jLabel38"); // NOI18N

        jTextFieldBackground1.setEditable(false);
        jTextFieldBackground1.setText(resourceMap.getString("jTextFieldBackground1.text")); // NOI18N
        jTextFieldBackground1.setName("jTextFieldBackground1"); // NOI18N

        jButtonBoardColor.setText(resourceMap.getString("jButtonBoardColor.text")); // NOI18N
        jButtonBoardColor.setEnabled(false);
        jButtonBoardColor.setName("jButtonBoardColor"); // NOI18N
        jButtonBoardColor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonBoardColorActionPerformed(evt);
            }
        });

        jCheckBox1.setText(resourceMap.getString("jCheckBox1.text")); // NOI18N
        jCheckBox1.setName("jCheckBox1"); // NOI18N
        jCheckBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCheckBox1ActionPerformed(evt);
            }
        });

        jLabel57.setText(resourceMap.getString("jLabel57.text")); // NOI18N
        jLabel57.setName("jLabel57"); // NOI18N

        jTextFieldBackground2.setEditable(false);
        jTextFieldBackground2.setName("jTextFieldBackground2"); // NOI18N

        jLabel55.setText(resourceMap.getString("jLabel55.text")); // NOI18N
        jLabel55.setName("jLabel55"); // NOI18N

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Default", "Custom 1", "Custom 2", "Custom 3" }));
        jComboBox1.setName("jComboBox1"); // NOI18N
        jComboBox1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBox1ActionPerformed(evt);
            }
        });

        jButtonBoardColor1.setText(resourceMap.getString("jButtonBoardColor1.text")); // NOI18N
        jButtonBoardColor1.setEnabled(false);
        jButtonBoardColor1.setName("jButtonBoardColor1"); // NOI18N
        jButtonBoardColor1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonBoardColor1ActionPerformed(evt);
            }
        });

        jLabel56.setText(resourceMap.getString("jLabel56.text")); // NOI18N
        jLabel56.setName("jLabel56"); // NOI18N

        jLabel58.setText(resourceMap.getString("jLabel58.text")); // NOI18N
        jLabel58.setName("jLabel58"); // NOI18N

        jTextFieldBackground3.setEditable(false);
        jTextFieldBackground3.setName("jTextFieldBackground3"); // NOI18N

        jTextFieldBackground4.setEditable(false);
        jTextFieldBackground4.setName("jTextFieldBackground4"); // NOI18N

        jButtonBoardColor2.setText(resourceMap.getString("jButtonBoardColor2.text")); // NOI18N
        jButtonBoardColor2.setEnabled(false);
        jButtonBoardColor2.setName("jButtonBoardColor2"); // NOI18N
        jButtonBoardColor2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonBoardColor2ActionPerformed(evt);
            }
        });

        jButtonBoardColor3.setText(resourceMap.getString("jButtonBoardColor3.text")); // NOI18N
        jButtonBoardColor3.setEnabled(false);
        jButtonBoardColor3.setName("jButtonBoardColor3"); // NOI18N
        jButtonBoardColor3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonBoardColor3ActionPerformed(evt);
            }
        });

        jLabel62.setText(resourceMap.getString("jLabel62.text")); // NOI18N
        jLabel62.setName("jLabel62"); // NOI18N

        jTextFieldClockFontSize.setName("jTextFieldClockFontSize"); // NOI18N

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel57)
                            .addComponent(jLabel56)
                            .addComponent(jLabel38))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextFieldBackground1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldBackground2, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldBackground3, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel58)
                            .addComponent(jLabel55))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldBackground4, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldClockFontSize, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jLabel62))
                .addGap(4, 4, 4)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonBoardColor2)
                    .addComponent(jButtonBoardColor1)
                    .addComponent(jButtonBoardColor3)
                    .addComponent(jButtonBoardColor)
                    .addComponent(jCheckBox1))
                .addContainerGap(41, Short.MAX_VALUE))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel38)
                    .addComponent(jTextFieldBackground1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonBoardColor))
                .addGap(9, 9, 9)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel56)
                    .addComponent(jTextFieldBackground2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonBoardColor1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel57)
                    .addComponent(jTextFieldBackground3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonBoardColor2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel58)
                    .addComponent(jTextFieldBackground4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonBoardColor3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel55)
                    .addComponent(jCheckBox1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel62)
                    .addComponent(jTextFieldClockFontSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(150, 150, 150))
        );

        javax.swing.GroupLayout jPanelConfigCenterLayout = new javax.swing.GroupLayout(jPanelConfigCenter);
        jPanelConfigCenter.setLayout(jPanelConfigCenterLayout);
        jPanelConfigCenterLayout.setHorizontalGroup(
            jPanelConfigCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelConfigCenterLayout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addGroup(jPanelConfigCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel12, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelConfigCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(89, 89, 89))
        );
        jPanelConfigCenterLayout.setVerticalGroup(
            jPanelConfigCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelConfigCenterLayout.createSequentialGroup()
                .addGap(40, 40, 40)
                .addGroup(jPanelConfigCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31)
                .addGroup(jPanelConfigCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelConfigCenterLayout.createSequentialGroup()
                        .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(112, Short.MAX_VALUE))
        );

        jPanelConfig.add(jPanelConfigCenter, java.awt.BorderLayout.CENTER);

        jTabbedPane1.addTab(resourceMap.getString("jPanelConfig.TabConstraints.tabTitle"), jPanelConfig); // NOI18N

        jPanelScore.setName("jPanelScore"); // NOI18N
        jPanelScore.setLayout(new java.awt.BorderLayout());

        jPanel2.setName("jPanel2"); // NOI18N

        jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel14.border.title"))); // NOI18N
        jPanel14.setName("jPanel14"); // NOI18N

        jLabel65.setText(resourceMap.getString("jLabel65.text")); // NOI18N
        jLabel65.setName("jLabel65"); // NOI18N

        jLabel66.setText(resourceMap.getString("jLabel66.text")); // NOI18N
        jLabel66.setName("jLabel66"); // NOI18N

        jTextFieldBlue1.setName("jTextFieldBlue1"); // NOI18N
        jTextFieldBlue1.setPreferredSize(new java.awt.Dimension(40, 20));

        jTextFieldRed1.setName("jTextFieldRed1"); // NOI18N
        jTextFieldRed1.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel67.setText(resourceMap.getString("jLabel67.text")); // NOI18N
        jLabel67.setName("jLabel67"); // NOI18N

        jLabel68.setText(resourceMap.getString("jLabel68.text")); // NOI18N
        jLabel68.setName("jLabel68"); // NOI18N

        jTextFieldBlueName.setName("jTextFieldBlueName"); // NOI18N

        jTextFieldRedName.setName("jTextFieldRedName"); // NOI18N

        jLabel69.setText(resourceMap.getString("jLabel69.text")); // NOI18N
        jLabel69.setName("jLabel69"); // NOI18N

        jLabel70.setText(resourceMap.getString("jLabel70.text")); // NOI18N
        jLabel70.setName("jLabel70"); // NOI18N

        jTextFieldBluePenality1.setName("jTextFieldBluePenality1"); // NOI18N
        jTextFieldBluePenality1.setPreferredSize(new java.awt.Dimension(40, 20));

        jTextFieldBluePenality2.setName("jTextFieldBluePenality2"); // NOI18N
        jTextFieldBluePenality2.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel71.setText(resourceMap.getString("jLabel71.text")); // NOI18N
        jLabel71.setName("jLabel71"); // NOI18N

        jLabel72.setText(resourceMap.getString("jLabel72.text")); // NOI18N
        jLabel72.setName("jLabel72"); // NOI18N

        jTextFieldRedPenality1.setName("jTextFieldRedPenality1"); // NOI18N
        jTextFieldRedPenality1.setPreferredSize(new java.awt.Dimension(40, 20));

        jTextFieldRedPenality2.setName("jTextFieldRedPenality2"); // NOI18N
        jTextFieldRedPenality2.setPreferredSize(new java.awt.Dimension(40, 20));

        jLabel73.setText(resourceMap.getString("jLabel73.text")); // NOI18N
        jLabel73.setName("jLabel73"); // NOI18N

        jLabel74.setText(resourceMap.getString("jLabel74.text")); // NOI18N
        jLabel74.setName("jLabel74"); // NOI18N

        jTextFieldRed2.setName("jTextFieldRed2"); // NOI18N
        jTextFieldRed2.setPreferredSize(new java.awt.Dimension(40, 20));

        jTextFieldBlue2.setName("jTextFieldBlue2"); // NOI18N
        jTextFieldBlue2.setPreferredSize(new java.awt.Dimension(40, 20));

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jLabel68)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTextFieldRedName, javax.swing.GroupLayout.DEFAULT_SIZE, 263, Short.MAX_VALUE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jLabel67)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTextFieldBlueName, javax.swing.GroupLayout.DEFAULT_SIZE, 262, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jLabel65))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGap(9, 9, 9)
                        .addComponent(jLabel66)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jTextFieldRed1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel70)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldRedPenality1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(jTextFieldBlue1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10)
                        .addComponent(jLabel69)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldBluePenality1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(12, 12, 12)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel72)
                    .addComponent(jLabel71))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldBluePenality2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldRedPenality2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel73)
                    .addComponent(jLabel74))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldBlue2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldRed2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jTextFieldBluePenality2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel71))
                        .addGap(14, 14, 14)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jTextFieldRedPenality2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel72)))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel67)
                            .addComponent(jTextFieldBlueName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel65)
                            .addComponent(jTextFieldBlue1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldBluePenality1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel73)
                            .addComponent(jTextFieldBlue2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel69))
                        .addGap(14, 14, 14)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel68)
                            .addComponent(jTextFieldRedName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel66)
                            .addComponent(jTextFieldRed1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextFieldRedPenality1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel74)
                            .addComponent(jLabel70)
                            .addComponent(jTextFieldRed2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(37, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(50, 50, 50)
                .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(175, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(45, 45, 45)
                .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(509, Short.MAX_VALUE))
        );

        jPanelScore.add(jPanel2, java.awt.BorderLayout.CENTER);

        jToolBar5.setFloatable(false);
        jToolBar5.setRollover(true);
        jToolBar5.setName("jToolBar5"); // NOI18N

        jButtonClearBoard.setIcon(resourceMap.getIcon("jButtonClearBoard.icon")); // NOI18N
        jButtonClearBoard.setText(resourceMap.getString("jButtonClearBoard.text")); // NOI18N
        jButtonClearBoard.setFocusable(false);
        jButtonClearBoard.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonClearBoard.setName("jButtonClearBoard"); // NOI18N
        jButtonClearBoard.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonClearBoard.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonClearBoardActionPerformed(evt);
            }
        });
        jToolBar5.add(jButtonClearBoard);

        jButtonRandomBoard.setIcon(resourceMap.getIcon("jButtonRandomBoard.icon")); // NOI18N
        jButtonRandomBoard.setText(resourceMap.getString("jButtonRandomBoard.text")); // NOI18N
        jButtonRandomBoard.setFocusable(false);
        jButtonRandomBoard.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonRandomBoard.setName("jButtonRandomBoard"); // NOI18N
        jButtonRandomBoard.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonRandomBoard.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonRandomBoardActionPerformed(evt);
            }
        });
        jToolBar5.add(jButtonRandomBoard);

        jButtonStartMatch.setIcon(resourceMap.getIcon("jButtonStartMatch.icon")); // NOI18N
        jButtonStartMatch.setText(resourceMap.getString("jButtonStartMatch.text")); // NOI18N
        jButtonStartMatch.setFocusable(false);
        jButtonStartMatch.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonStartMatch.setName("jButtonStartMatch"); // NOI18N
        jButtonStartMatch.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonStartMatch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonStartMatchActionPerformed(evt);
            }
        });
        jToolBar5.add(jButtonStartMatch);

        jButtonPauseMatch.setIcon(resourceMap.getIcon("jButtonPauseMatch.icon")); // NOI18N
        jButtonPauseMatch.setText(resourceMap.getString("jButtonPauseMatch.text")); // NOI18N
        jButtonPauseMatch.setFocusable(false);
        jButtonPauseMatch.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonPauseMatch.setName("jButtonPauseMatch"); // NOI18N
        jButtonPauseMatch.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonPauseMatch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonPauseMatchActionPerformed(evt);
            }
        });
        jToolBar5.add(jButtonPauseMatch);

        jButtonStopMatch.setIcon(resourceMap.getIcon("jButtonStopMatch.icon")); // NOI18N
        jButtonStopMatch.setText(resourceMap.getString("jButtonStopMatch.text")); // NOI18N
        jButtonStopMatch.setFocusable(false);
        jButtonStopMatch.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonStopMatch.setName("jButtonStopMatch"); // NOI18N
        jButtonStopMatch.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonStopMatch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonStopMatchActionPerformed(evt);
            }
        });
        jToolBar5.add(jButtonStopMatch);

        jButtonResetMatch.setIcon(resourceMap.getIcon("jButtonResetMatch.icon")); // NOI18N
        jButtonResetMatch.setText(resourceMap.getString("jButtonResetMatch.text")); // NOI18N
        jButtonResetMatch.setFocusable(false);
        jButtonResetMatch.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonResetMatch.setName("jButtonResetMatch"); // NOI18N
        jButtonResetMatch.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonResetMatch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonResetMatchActionPerformed(evt);
            }
        });
        jToolBar5.add(jButtonResetMatch);

        jPanelScore.add(jToolBar5, java.awt.BorderLayout.SOUTH);

        jTabbedPane1.addTab(resourceMap.getString("jPanelScore.TabConstraints.tabTitle"), jPanelScore); // NOI18N

        jPanelBoard.setName("jPanelBoard"); // NOI18N
        jPanelBoard.setLayout(new java.awt.BorderLayout());

        jPanelBoardCenter.setName("jPanelBoardCenter"); // NOI18N
        jPanelBoardCenter.setLayout(new java.awt.BorderLayout());

        jPanelBoardScoreTop.setName("jPanelBoardScoreTop"); // NOI18N
        jPanelBoardScoreTop.setLayout(new java.awt.BorderLayout());

        jLabelMatchName.setFont(resourceMap.getFont("jLabelMatchName.font")); // NOI18N
        jLabelMatchName.setForeground(resourceMap.getColor("jLabelMatchName.foreground")); // NOI18N
        jLabelMatchName.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelMatchName.setText(resourceMap.getString("jLabelMatchName.text")); // NOI18N
        jLabelMatchName.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jLabelMatchName.setName("jLabelMatchName"); // NOI18N
        jPanelBoardScoreTop.add(jLabelMatchName, java.awt.BorderLayout.PAGE_START);

        jPanelBoardCenter.add(jPanelBoardScoreTop, java.awt.BorderLayout.NORTH);

        jPanelBoardScore.setName("jPanelBoardScore"); // NOI18N
        jPanelBoardScore.setLayout(new java.awt.GridLayout(1, 2));

        jPanel3.setName("jPanel3"); // NOI18N
        jPanel3.setLayout(new java.awt.BorderLayout());

        jLabelRedPoint.setFont(resourceMap.getFont("jLabelRedPoint.font")); // NOI18N
        jLabelRedPoint.setForeground(resourceMap.getColor("jLabelRedPoint.foreground")); // NOI18N
        jLabelRedPoint.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelRedPoint.setText(resourceMap.getString("jLabelRedPoint.text")); // NOI18N
        jLabelRedPoint.setName("jLabelRedPoint"); // NOI18N
        jPanel3.add(jLabelRedPoint, java.awt.BorderLayout.CENTER);

        jLabelRedName.setFont(resourceMap.getFont("jLabelRedName.font")); // NOI18N
        jLabelRedName.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelRedName.setText(resourceMap.getString("jLabelRedName.text")); // NOI18N
        jLabelRedName.setName("jLabelRedName"); // NOI18N
        jPanel3.add(jLabelRedName, java.awt.BorderLayout.PAGE_START);

        jLabelRedPenality.setFont(resourceMap.getFont("jLabelRedPenality.font")); // NOI18N
        jLabelRedPenality.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelRedPenality.setText(resourceMap.getString("jLabelRedPenality.text")); // NOI18N
        jLabelRedPenality.setName("jLabelRedPenality"); // NOI18N
        jPanel3.add(jLabelRedPenality, java.awt.BorderLayout.PAGE_END);
        jLabelRedPenality.getAccessibleContext().setAccessibleName(resourceMap.getString("jLabel2.AccessibleContext.accessibleName")); // NOI18N

        jPanelBoardScore.add(jPanel3);

        jPanel10.setName("jPanel10"); // NOI18N
        jPanel10.setLayout(new java.awt.BorderLayout());

        jLabelBluePoint.setFont(resourceMap.getFont("jLabelBluePoint.font")); // NOI18N
        jLabelBluePoint.setForeground(resourceMap.getColor("jLabelBluePoint.foreground")); // NOI18N
        jLabelBluePoint.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelBluePoint.setText(resourceMap.getString("jLabelBluePoint.text")); // NOI18N
        jLabelBluePoint.setName("jLabelBluePoint"); // NOI18N
        jPanel10.add(jLabelBluePoint, java.awt.BorderLayout.CENTER);

        jLabelBlueName.setFont(resourceMap.getFont("jLabelBlueName.font")); // NOI18N
        jLabelBlueName.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelBlueName.setText(resourceMap.getString("jLabelBlueName.text")); // NOI18N
        jLabelBlueName.setName("jLabelBlueName"); // NOI18N
        jPanel10.add(jLabelBlueName, java.awt.BorderLayout.PAGE_START);

        jLabelBluePenality.setFont(resourceMap.getFont("jLabelBluePenality.font")); // NOI18N
        jLabelBluePenality.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelBluePenality.setText(resourceMap.getString("jLabelBluePenality.text")); // NOI18N
        jLabelBluePenality.setName("jLabelBluePenality"); // NOI18N
        jPanel10.add(jLabelBluePenality, java.awt.BorderLayout.PAGE_END);

        jPanelBoardScore.add(jPanel10);

        jPanelBoardCenter.add(jPanelBoardScore, java.awt.BorderLayout.CENTER);

        jPanelBoardScoreSouth.setName("jPanelBoardScoreSouth"); // NOI18N

        jLabelRound.setFont(resourceMap.getFont("jLabelRound.font")); // NOI18N
        jLabelRound.setText(resourceMap.getString("jLabelRound.text")); // NOI18N
        jLabelRound.setName("jLabelRound"); // NOI18N
        jPanelBoardScoreSouth.add(jLabelRound);

        jLabelTime.setFont(resourceMap.getFont("jLabelTime.font")); // NOI18N
        jLabelTime.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelTime.setText(resourceMap.getString("jLabelTime.text")); // NOI18N
        jLabelTime.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jLabelTime.setName("jLabelTime"); // NOI18N
        jPanelBoardScoreSouth.add(jLabelTime);

        jPanelBoardCenter.add(jPanelBoardScoreSouth, java.awt.BorderLayout.SOUTH);

        jPanelBoard.add(jPanelBoardCenter, java.awt.BorderLayout.CENTER);

        jTabbedPane1.addTab(resourceMap.getString("jPanelBoard.TabConstraints.tabTitle"), jPanelBoard); // NOI18N

        jPanelTimer.setName("jPanelTimer"); // NOI18N
        jPanelTimer.setLayout(new java.awt.BorderLayout());

        jToolBar3.setFloatable(false);
        jToolBar3.setRollover(true);
        jToolBar3.setName("jToolBar3"); // NOI18N

        jButtonStartTimer.setIcon(resourceMap.getIcon("jButtonStartTimer.icon")); // NOI18N
        jButtonStartTimer.setText(resourceMap.getString("jButtonStartTimer.text")); // NOI18N
        jButtonStartTimer.setFocusable(false);
        jButtonStartTimer.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonStartTimer.setName("jButtonStartTimer"); // NOI18N
        jButtonStartTimer.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonStartTimer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonStartTimerActionPerformed(evt);
            }
        });
        jToolBar3.add(jButtonStartTimer);

        jButtonPauseTimer.setIcon(resourceMap.getIcon("jButtonPauseTimer.icon")); // NOI18N
        jButtonPauseTimer.setText(resourceMap.getString("jButtonPauseTimer.text")); // NOI18N
        jButtonPauseTimer.setFocusable(false);
        jButtonPauseTimer.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonPauseTimer.setName("jButtonPauseTimer"); // NOI18N
        jButtonPauseTimer.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonPauseTimer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonPauseTimerActionPerformed(evt);
            }
        });
        jToolBar3.add(jButtonPauseTimer);

        jButtonStopTimer.setIcon(resourceMap.getIcon("jButtonStopTimer.icon")); // NOI18N
        jButtonStopTimer.setText(resourceMap.getString("jButtonStopTimer.text")); // NOI18N
        jButtonStopTimer.setFocusable(false);
        jButtonStopTimer.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonStopTimer.setName("jButtonStopTimer"); // NOI18N
        jButtonStopTimer.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonStopTimer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonStopTimerActionPerformed(evt);
            }
        });
        jToolBar3.add(jButtonStopTimer);

        jButtonResetTimer.setIcon(resourceMap.getIcon("jButtonResetTimer.icon")); // NOI18N
        jButtonResetTimer.setText(resourceMap.getString("jButtonResetTimer.text")); // NOI18N
        jButtonResetTimer.setFocusable(false);
        jButtonResetTimer.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonResetTimer.setName("jButtonResetTimer"); // NOI18N
        jButtonResetTimer.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonResetTimer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonResetTimerActionPerformed(evt);
            }
        });
        jToolBar3.add(jButtonResetTimer);

        jPanelTimer.add(jToolBar3, java.awt.BorderLayout.SOUTH);

        jPanel1.setName("jPanel1"); // NOI18N
        jPanel1.setLayout(new java.awt.GridBagLayout());

        jPanelClock.setName("jPanelClock"); // NOI18N

        javax.swing.GroupLayout jPanelClockLayout = new javax.swing.GroupLayout(jPanelClock);
        jPanelClock.setLayout(jPanelClockLayout);
        jPanelClockLayout.setHorizontalGroup(
            jPanelClockLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 500, Short.MAX_VALUE)
        );
        jPanelClockLayout.setVerticalGroup(
            jPanelClockLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 686, Short.MAX_VALUE)
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        jPanel1.add(jPanelClock, gridBagConstraints);

        jPanel4.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
        jPanel4.setName("jPanel4"); // NOI18N

        jLabel10.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap(260, Short.MAX_VALUE)
                .addComponent(jLabel10)
                .addGap(104, 104, 104))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(195, 195, 195)
                .addComponent(jLabel10)
                .addContainerGap(431, Short.MAX_VALUE))
        );

        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 0.5;
        gridBagConstraints.weighty = 1.0;
        jPanel1.add(jPanel4, gridBagConstraints);

        jPanelTimer.add(jPanel1, java.awt.BorderLayout.CENTER);

        jTabbedPane1.addTab(resourceMap.getString("jPanelTimer.TabConstraints.tabTitle"), jPanelTimer); // NOI18N

        jPanelRing2.setName("jPanelRing2"); // NOI18N
        jPanelRing2.setLayout(new java.awt.BorderLayout());

        jPanelRing2Center.setName("jPanelRing2Center"); // NOI18N

        jLabel29.setIcon(resourceMap.getIcon("jLabel29.icon")); // NOI18N
        jLabel29.setText(resourceMap.getString("jLabel29.text")); // NOI18N
        jLabel29.setName("jLabel29"); // NOI18N

        jLabel30.setText(resourceMap.getString("jLabel30.text")); // NOI18N
        jLabel30.setName("jLabel30"); // NOI18N

        jLabel31.setText(resourceMap.getString("jLabel31.text")); // NOI18N
        jLabel31.setName("jLabel31"); // NOI18N

        jLabel32.setText(resourceMap.getString("jLabel32.text")); // NOI18N
        jLabel32.setName("jLabel32"); // NOI18N

        jLabel33.setText(resourceMap.getString("jLabel33.text")); // NOI18N
        jLabel33.setName("jLabel33"); // NOI18N

        jLabelR2Icon.setIcon(resourceMap.getIcon("jLabelR2Icon.icon")); // NOI18N
        jLabelR2Icon.setText(resourceMap.getString("jLabelR2Icon.text")); // NOI18N
        jLabelR2Icon.setName("jLabelR2Icon"); // NOI18N

        jLabelR1Icon.setIcon(resourceMap.getIcon("jLabelR1Icon.icon")); // NOI18N
        jLabelR1Icon.setText(resourceMap.getString("jLabelR1Icon.text")); // NOI18N
        jLabelR1Icon.setName("jLabelR1Icon"); // NOI18N

        jLabelR3Icon.setIcon(resourceMap.getIcon("jLabelR3Icon.icon")); // NOI18N
        jLabelR3Icon.setText(resourceMap.getString("jLabelR3Icon.text")); // NOI18N
        jLabelR3Icon.setName("jLabelR3Icon"); // NOI18N

        jLabelR4Icon.setIcon(resourceMap.getIcon("jLabelR4Icon.icon")); // NOI18N
        jLabelR4Icon.setText(resourceMap.getString("jLabelR4Icon.text")); // NOI18N
        jLabelR4Icon.setName("jLabelR4Icon"); // NOI18N

        javax.swing.GroupLayout jPanelRing2CenterLayout = new javax.swing.GroupLayout(jPanelRing2Center);
        jPanelRing2Center.setLayout(jPanelRing2CenterLayout);
        jPanelRing2CenterLayout.setHorizontalGroup(
            jPanelRing2CenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelRing2CenterLayout.createSequentialGroup()
                .addGap(98, 98, 98)
                .addGroup(jPanelRing2CenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel30)
                    .addComponent(jLabel32)
                    .addComponent(jLabelR1Icon)
                    .addComponent(jLabelR4Icon))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel29)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelRing2CenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelR3Icon)
                    .addComponent(jLabelR2Icon)
                    .addComponent(jLabel31)
                    .addComponent(jLabel33))
                .addContainerGap(517, Short.MAX_VALUE))
        );
        jPanelRing2CenterLayout.setVerticalGroup(
            jPanelRing2CenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelRing2CenterLayout.createSequentialGroup()
                .addGap(77, 77, 77)
                .addGroup(jPanelRing2CenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelR2Icon)
                    .addComponent(jLabelR1Icon))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelRing2CenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel29)
                    .addGroup(jPanelRing2CenterLayout.createSequentialGroup()
                        .addComponent(jLabel31)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel33))
                    .addGroup(jPanelRing2CenterLayout.createSequentialGroup()
                        .addComponent(jLabel30)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel32)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelRing2CenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelR3Icon)
                    .addComponent(jLabelR4Icon))
                .addContainerGap(265, Short.MAX_VALUE))
        );

        jPanelRing2.add(jPanelRing2Center, java.awt.BorderLayout.CENTER);

        jTabbedPane1.addTab(resourceMap.getString("jPanelRing2.TabConstraints.tabTitle"), jPanelRing2); // NOI18N

        jPanelLogs.setName("jPanelLogs"); // NOI18N
        jPanelLogs.setLayout(new java.awt.BorderLayout());

        jScrollPane5.setName("jScrollPane5"); // NOI18N

        jTextArea2.setColumns(20);
        jTextArea2.setRows(5);
        jTextArea2.setName("jTextArea2"); // NOI18N
        jScrollPane5.setViewportView(jTextArea2);

        jPanelLogs.add(jScrollPane5, java.awt.BorderLayout.CENTER);

        jToolBar1.setFloatable(false);
        jToolBar1.setRollover(true);
        jToolBar1.setName("jToolBar1"); // NOI18N

        jButton3.setIcon(resourceMap.getIcon("jButton3.icon")); // NOI18N
        jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
        jButton3.setFocusable(false);
        jButton3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton3.setName("jButton3"); // NOI18N
        jButton3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        jToolBar1.add(jButton3);

        jButton12.setIcon(resourceMap.getIcon("jButton12.icon")); // NOI18N
        jButton12.setText(resourceMap.getString("jButton12.text")); // NOI18N
        jButton12.setEnabled(false);
        jButton12.setFocusable(false);
        jButton12.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton12.setName("jButton12"); // NOI18N
        jButton12.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton12ActionPerformed(evt);
            }
        });
        jToolBar1.add(jButton12);

        jButton2.setIcon(resourceMap.getIcon("jButton2.icon")); // NOI18N
        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setEnabled(false);
        jButton2.setFocusable(false);
        jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton2.setName("jButton2"); // NOI18N
        jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jToolBar1.add(jButton2);

        jButton4.setIcon(resourceMap.getIcon("jButton4.icon")); // NOI18N
        jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
        jButton4.setEnabled(false);
        jButton4.setFocusable(false);
        jButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButton4.setName("jButton4"); // NOI18N
        jButton4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });
        jToolBar1.add(jButton4);

        jPanelLogs.add(jToolBar1, java.awt.BorderLayout.SOUTH);

        jTabbedPane1.addTab(resourceMap.getString("jPanelLogs.TabConstraints.tabTitle"), jPanelLogs); // NOI18N

        jPanelDiag.setName("jPanelDiag"); // NOI18N
        jPanelDiag.setLayout(new java.awt.BorderLayout());

        jToolBar4.setFloatable(false);
        jToolBar4.setRollover(true);
        jToolBar4.setName("jToolBar4"); // NOI18N

        jButtonHwDetect.setIcon(resourceMap.getIcon("jButtonHwDetect.icon")); // NOI18N
        jButtonHwDetect.setText(resourceMap.getString("jButtonHwDetect.text")); // NOI18N
        jButtonHwDetect.setEnabled(false);
        jButtonHwDetect.setFocusable(false);
        jButtonHwDetect.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonHwDetect.setName("jButtonHwDetect"); // NOI18N
        jButtonHwDetect.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonHwDetect.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonHwDetectActionPerformed(evt);
            }
        });
        jToolBar4.add(jButtonHwDetect);

        jButtonHwTest.setIcon(resourceMap.getIcon("jButtonHwTest.icon")); // NOI18N
        jButtonHwTest.setText(resourceMap.getString("jButtonHwTest.text")); // NOI18N
        jButtonHwTest.setEnabled(false);
        jButtonHwTest.setFocusable(false);
        jButtonHwTest.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonHwTest.setName("jButtonHwTest"); // NOI18N
        jButtonHwTest.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonHwTest.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonHwTestActionPerformed(evt);
            }
        });
        jToolBar4.add(jButtonHwTest);

        jButtonStartWorker.setIcon(resourceMap.getIcon("jButtonStartWorker.icon")); // NOI18N
        jButtonStartWorker.setText(resourceMap.getString("jButtonStartWorker.text")); // NOI18N
        jButtonStartWorker.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonStartWorker.setName("jButtonStartWorker"); // NOI18N
        jButtonStartWorker.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonStartWorker.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonStartWorkerActionPerformed(evt);
            }
        });
        jToolBar4.add(jButtonStartWorker);

        jButtonStopWorker.setIcon(resourceMap.getIcon("jButtonStopWorker.icon")); // NOI18N
        jButtonStopWorker.setText(resourceMap.getString("jButtonStopWorker.text")); // NOI18N
        jButtonStopWorker.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jButtonStopWorker.setName("jButtonStopWorker"); // NOI18N
        jButtonStopWorker.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jButtonStopWorker.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonStopWorkerActionPerformed(evt);
            }
        });
        jToolBar4.add(jButtonStopWorker);

        jPanelDiag.add(jToolBar4, java.awt.BorderLayout.SOUTH);

        jPanelDiagCenter.setName("jPanelDiagCenter"); // NOI18N

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel6.border.title"))); // NOI18N
        jPanel6.setName("jPanel6"); // NOI18N

        jTextFieldJ2.setName("jTextFieldJ2"); // NOI18N

        jTextFieldJ1.setName("jTextFieldJ1"); // NOI18N

        jTextFieldJ3.setName("jTextFieldJ3"); // NOI18N

        jTextFieldJ4.setName("jTextFieldJ4"); // NOI18N

        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N

        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
        jLabel18.setName("jLabel18"); // NOI18N

        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
        jLabel19.setName("jLabel19"); // NOI18N

        jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
        jLabel20.setName("jLabel20"); // NOI18N

        jComboBoxJ1.setName("jComboBoxJ1"); // NOI18N
        jComboBoxJ1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxJ1ActionPerformed(evt);
            }
        });

        jComboBoxJ2.setName("jComboBoxJ2"); // NOI18N
        jComboBoxJ2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxJ2ActionPerformed(evt);
            }
        });

        jComboBoxJ3.setName("jComboBoxJ3"); // NOI18N
        jComboBoxJ3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxJ3ActionPerformed(evt);
            }
        });

        jComboBoxJ4.setName("jComboBoxJ4"); // NOI18N
        jComboBoxJ4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxJ4ActionPerformed(evt);
            }
        });

        jLabelJ3.setIcon(resourceMap.getIcon("jLabelJ3.icon")); // NOI18N
        jLabelJ3.setText(resourceMap.getString("jLabelJ3.text")); // NOI18N
        jLabelJ3.setName("jLabelJ3"); // NOI18N

        jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
        jLabel25.setName("jLabel25"); // NOI18N

        jLabel26.setText(resourceMap.getString("jLabel26.text")); // NOI18N
        jLabel26.setName("jLabel26"); // NOI18N

        jLabel27.setText(resourceMap.getString("jLabel27.text")); // NOI18N
        jLabel27.setName("jLabel27"); // NOI18N

        jLabelJ1.setIcon(resourceMap.getIcon("jLabelJ1.icon")); // NOI18N
        jLabelJ1.setName("jLabelJ1"); // NOI18N

        jLabelJ2.setIcon(resourceMap.getIcon("jLabelJ2.icon")); // NOI18N
        jLabelJ2.setName("jLabelJ2"); // NOI18N

        jLabelJ4.setIcon(resourceMap.getIcon("jLabelJ4.icon")); // NOI18N
        jLabelJ4.setName("jLabelJ4"); // NOI18N

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel18)
                            .addComponent(jLabel15))
                        .addComponent(jLabel19))
                    .addComponent(jLabel20))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jTextFieldJ4)
                    .addComponent(jTextFieldJ3)
                    .addComponent(jLabel25)
                    .addComponent(jTextFieldJ2, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jTextFieldJ1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 120, Short.MAX_VALUE))
                .addGap(10, 10, 10)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jComboBoxJ4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jComboBoxJ3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jComboBoxJ2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jComboBoxJ1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel26))
                .addGap(18, 18, 18)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelJ1)
                    .addComponent(jLabelJ2)
                    .addComponent(jLabelJ3)
                    .addComponent(jLabelJ4)
                    .addComponent(jLabel27))
                .addContainerGap(35, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel25)
                            .addComponent(jLabel27)
                            .addComponent(jLabel26))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel15)
                            .addComponent(jTextFieldJ1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBoxJ1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jLabelJ1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabelJ2)
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel18)
                        .addComponent(jTextFieldJ2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jComboBoxJ2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTextFieldJ3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel19)
                        .addComponent(jComboBoxJ3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabelJ3))
                .addGap(11, 11, 11)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jTextFieldJ4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel20)
                        .addComponent(jComboBoxJ4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabelJ4))
                .addContainerGap())
        );

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel11.border.title"))); // NOI18N
        jPanel11.setName("jPanel11"); // NOI18N

        jTextFieldR2.setName("jTextFieldR2"); // NOI18N

        jTextFieldR1.setName("jTextFieldR1"); // NOI18N

        jTextFieldR3.setName("jTextFieldR3"); // NOI18N

        jTextFieldR4.setName("jTextFieldR4"); // NOI18N

        jLabel43.setText(resourceMap.getString("jLabel43.text")); // NOI18N
        jLabel43.setName("jLabel43"); // NOI18N

        jLabel44.setText(resourceMap.getString("jLabel44.text")); // NOI18N
        jLabel44.setName("jLabel44"); // NOI18N

        jLabel45.setText(resourceMap.getString("jLabel45.text")); // NOI18N
        jLabel45.setName("jLabel45"); // NOI18N

        jLabel46.setText(resourceMap.getString("jLabel46.text")); // NOI18N
        jLabel46.setName("jLabel46"); // NOI18N

        jLabelR3.setIcon(resourceMap.getIcon("jLabelR3.icon")); // NOI18N
        jLabelR3.setName("jLabelR3"); // NOI18N

        jLabel48.setText(resourceMap.getString("jLabel48.text")); // NOI18N
        jLabel48.setName("jLabel48"); // NOI18N

        jLabelR1.setIcon(resourceMap.getIcon("jLabelR1.icon")); // NOI18N
        jLabelR1.setName("jLabelR1"); // NOI18N

        jLabelR2.setIcon(resourceMap.getIcon("jLabelR2.icon")); // NOI18N
        jLabelR2.setName("jLabelR2"); // NOI18N

        jLabelR4.setIcon(resourceMap.getIcon("jLabelR4.icon")); // NOI18N
        jLabelR4.setName("jLabelR4"); // NOI18N

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jScrollPane4.setName("jScrollPane4"); // NOI18N

        jList1.setName("jList1"); // NOI18N
        jScrollPane4.setViewportView(jList1);

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 332, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel44)
                            .addComponent(jLabel43)
                            .addComponent(jLabel46)
                            .addComponent(jLabel45))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel11Layout.createSequentialGroup()
                                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jTextFieldR4)
                                    .addComponent(jTextFieldR3)
                                    .addComponent(jTextFieldR2, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jTextFieldR1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabelR2)
                                    .addComponent(jLabelR1)
                                    .addComponent(jLabelR3)
                                    .addComponent(jLabelR4)))
                            .addComponent(jLabel48)))
                    .addComponent(jLabel1))
                .addContainerGap(20, Short.MAX_VALUE))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addComponent(jLabel48)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel43)
                                .addComponent(jTextFieldR1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jLabelR1))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel44)
                                .addComponent(jTextFieldR2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jLabelR2))
                        .addGap(11, 11, 11)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldR3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel45))
                            .addComponent(jLabelR3))
                        .addGap(7, 7, 7)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jTextFieldR4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel46))
                            .addComponent(jLabelR4))))
                .addGap(28, 28, 28))
        );

        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jPanel13.border.title"))); // NOI18N
        jPanel13.setName("jPanel13"); // NOI18N

        jLabel36.setText(resourceMap.getString("jLabel36.text")); // NOI18N
        jLabel36.setName("jLabel36"); // NOI18N

        jLabel34.setText(resourceMap.getString("jLabel34.text")); // NOI18N
        jLabel34.setName("jLabel34"); // NOI18N

        jLabel35.setText(resourceMap.getString("jLabel35.text")); // NOI18N
        jLabel35.setName("jLabel35"); // NOI18N

        jLabel37.setText(resourceMap.getString("jLabel37.text")); // NOI18N
        jLabel37.setName("jLabel37"); // NOI18N

        jTextFieldShort1.setName("jTextFieldShort1"); // NOI18N

        jTextFieldShort2.setName("jTextFieldShort2"); // NOI18N

        jTextFieldShort3.setName("jTextFieldShort3"); // NOI18N

        jTextFieldShort4.setName("jTextFieldShort4"); // NOI18N

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addComponent(jLabel37)
                        .addGap(13, 13, 13)
                        .addComponent(jTextFieldShort4))
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addComponent(jLabel35)
                        .addGap(11, 11, 11)
                        .addComponent(jTextFieldShort3))
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addComponent(jLabel34)
                        .addGap(16, 16, 16)
                        .addComponent(jTextFieldShort2))
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addComponent(jLabel36)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jTextFieldShort1, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel36)
                    .addComponent(jTextFieldShort1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel34)
                    .addComponent(jTextFieldShort2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel35)
                    .addComponent(jTextFieldShort3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(jTextFieldShort4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(72, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanelDiagCenterLayout = new javax.swing.GroupLayout(jPanelDiagCenter);
        jPanelDiagCenter.setLayout(jPanelDiagCenterLayout);
        jPanelDiagCenterLayout.setHorizontalGroup(
            jPanelDiagCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDiagCenterLayout.createSequentialGroup()
                .addGap(41, 41, 41)
                .addGroup(jPanelDiagCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanelDiagCenterLayout.createSequentialGroup()
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(30, 30, 30)
                        .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(461, Short.MAX_VALUE))
        );
        jPanelDiagCenterLayout.setVerticalGroup(
            jPanelDiagCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDiagCenterLayout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(35, 35, 35)
                .addGroup(jPanelDiagCenterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(391, Short.MAX_VALUE))
        );

        jPanelDiag.add(jPanelDiagCenter, java.awt.BorderLayout.PAGE_START);

        jTabbedPane1.addTab(resourceMap.getString("jPanelDiag.TabConstraints.tabTitle"), jPanelDiag); // NOI18N

        jPanelAbout.setName("jPanelAbout"); // NOI18N

        jLabel9.setFont(resourceMap.getFont("jLabel9.font")); // NOI18N
        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        jLabel11.setFont(resourceMap.getFont("jLabel11.font")); // NOI18N
        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        jLabel12.setFont(resourceMap.getFont("jLabel12.font")); // NOI18N
        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jLabel13.setFont(resourceMap.getFont("jLabel13.font")); // NOI18N
        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        jLabel14.setFont(resourceMap.getFont("jLabel14.font")); // NOI18N
        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        rLinkLabel1.setText(resourceMap.getString("rLinkLabel1.text")); // NOI18N
        rLinkLabel1.setName("rLinkLabel1"); // NOI18N
        rLinkLabel1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                rLinkLabel1MouseClicked(evt);
            }
        });

        rLinkLabel2.setText(resourceMap.getString("rLinkLabel2.text")); // NOI18N
        rLinkLabel2.setName("rLinkLabel2"); // NOI18N
        rLinkLabel2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                rLinkLabel2MouseClicked(evt);
            }
        });

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        appTitleLabel.setFont(appTitleLabel.getFont().deriveFont(appTitleLabel.getFont().getStyle() | java.awt.Font.BOLD, appTitleLabel.getFont().getSize()+4));
        appTitleLabel.setText(resourceMap.getString("appTitleLabel.text")); // NOI18N
        appTitleLabel.setName("appTitleLabel"); // NOI18N

        jLabel17.setFont(resourceMap.getFont("jLabel17.font")); // NOI18N
        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
        jLabel17.setName("jLabel17"); // NOI18N

        rLinkLabel3.setText(resourceMap.getString("rLinkLabel3.text")); // NOI18N
        rLinkLabel3.setName("rLinkLabel3"); // NOI18N
        rLinkLabel3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                rLinkLabel3MouseClicked(evt);
            }
        });

        rLinkLabel4.setText(resourceMap.getString("rLinkLabel4.text")); // NOI18N
        rLinkLabel4.setName("rLinkLabel4"); // NOI18N
        rLinkLabel4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                rLinkLabel4MouseClicked(evt);
            }
        });

        imageLabel.setName("imageLabel"); // NOI18N

        rLinkLabel5.setText(resourceMap.getString("rLinkLabel5.text")); // NOI18N
        rLinkLabel5.setName("rLinkLabel5"); // NOI18N
        rLinkLabel5.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                rLinkLabel5MouseClicked(evt);
            }
        });

        jLabel28.setFont(resourceMap.getFont("jLabel28.font")); // NOI18N
        jLabel28.setText(resourceMap.getString("jLabel28.text")); // NOI18N
        jLabel28.setName("jLabel28"); // NOI18N

        rLinkLabel6.setText(resourceMap.getString("rLinkLabel6.text")); // NOI18N
        rLinkLabel6.setName("rLinkLabel6"); // NOI18N
        rLinkLabel6.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                rLinkLabel6MouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanelAboutLayout = new javax.swing.GroupLayout(jPanelAbout);
        jPanelAbout.setLayout(jPanelAboutLayout);
        jPanelAboutLayout.setHorizontalGroup(
            jPanelAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelAboutLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(imageLabel)
                .addGap(18, 18, 18)
                .addGroup(jPanelAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel13)
                    .addComponent(jLabel9)
                    .addComponent(jLabel12)
                    .addComponent(jLabel14)
                    .addComponent(jLabel11)
                    .addComponent(jLabel17)
                    .addComponent(jLabel28))
                .addGap(40, 40, 40)
                .addGroup(jPanelAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(rLinkLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rLinkLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanelAboutLayout.createSequentialGroup()
                        .addComponent(rLinkLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(rLinkLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(rLinkLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rLinkLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16)
                    .addComponent(appTitleLabel))
                .addContainerGap(703, Short.MAX_VALUE))
        );
        jPanelAboutLayout.setVerticalGroup(
            jPanelAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelAboutLayout.createSequentialGroup()
                .addGap(69, 69, 69)
                .addGroup(jPanelAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(appTitleLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(jLabel16))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(rLinkLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(rLinkLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(rLinkLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(rLinkLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(rLinkLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rLinkLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel28))
                .addContainerGap(497, Short.MAX_VALUE))
            .addGroup(jPanelAboutLayout.createSequentialGroup()
                .addGap(47, 47, 47)
                .addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 148, Short.MAX_VALUE)
                .addGap(773, 773, 773))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanelAbout.TabConstraints.tabTitle"), jPanelAbout); // NOI18N

        mainPanel.add(jTabbedPane1);

        menuBar.setName("menuBar"); // NOI18N

        fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
        fileMenu.setName("fileMenu"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(it.iubar.tkdscore.TkdScoreApp.class).getContext().getActionMap(TkdScoreView.class, this);
        exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
        exitMenuItem.setName("exitMenuItem"); // NOI18N
        fileMenu.add(exitMenuItem);

        menuBar.add(fileMenu);

        helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
        helpMenu.setName("helpMenu"); // NOI18N

        aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
        aboutMenuItem.setName("aboutMenuItem"); // NOI18N
        helpMenu.add(aboutMenuItem);

        menuBar.add(helpMenu);

        statusPanel.setName("statusPanel"); // NOI18N

        statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

        statusMessageLabel.setName("statusMessageLabel"); // NOI18N

        statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

        progressBar.setName("progressBar"); // NOI18N

        javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 1062, Short.MAX_VALUE)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(statusMessageLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 892, Short.MAX_VALUE)
                .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(statusAnimationLabel)
                .addContainerGap())
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(statusMessageLabel)
                    .addComponent(statusAnimationLabel)
                    .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(3, 3, 3))
        );

        setComponent(mainPanel);
        setMenuBar(menuBar);
        setStatusBar(statusPanel);
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonHwTestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonHwTestActionPerformed
        updateRefereeGui();
}//GEN-LAST:event_jButtonHwTestActionPerformed

    private void jButtonHwDetectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonHwDetectActionPerformed
        //fillControllersInfo();
        String info = ControllerInfo.getSwLibVersion();
        addLogToTextArea(info);
}//GEN-LAST:event_jButtonHwDetectActionPerformed

    private void jButtonResetTimerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonResetTimerActionPerformed
        clock.reset();
        updateButtons(STATUS_RESETTED);
}//GEN-LAST:event_jButtonResetTimerActionPerformed

    private void jButtonStopTimerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonStopTimerActionPerformed
        stopClock();
}//GEN-LAST:event_jButtonStopTimerActionPerformed

    private void jButtonStartTimerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonStartTimerActionPerformed
        startClock();
        updateButtons(STATUS_STOPPED);
}//GEN-LAST:event_jButtonStartTimerActionPerformed

    private void jButtonRandomBoardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRandomBoardActionPerformed
        Random generator = new Random();
        int n = generator.nextInt(2) + 1;
        Logic.addOneRandomPointTo(n);
}//GEN-LAST:event_jButtonRandomBoardActionPerformed

    private void jButtonClearBoardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonClearBoardActionPerformed
        clearPoints();
}//GEN-LAST:event_jButtonClearBoardActionPerformed

    private void jButtonLoadConfigActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonLoadConfigActionPerformed
        loadConfig();
}//GEN-LAST:event_jButtonLoadConfigActionPerformed

    private void jButtonPauseTimerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonPauseTimerActionPerformed
        pauseClock();
        updateButtons(STATUS_BREAKTIME);
    }//GEN-LAST:event_jButtonPauseTimerActionPerformed

    private void jButtonSaveConfigActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSaveConfigActionPerformed
        saveConfig();
    }//GEN-LAST:event_jButtonSaveConfigActionPerformed

    private void jButtonApplyConfigActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonApplyConfigActionPerformed
        applyConfig();
    }//GEN-LAST:event_jButtonApplyConfigActionPerformed

    private void jButtonStartWorkerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonStartWorkerActionPerformed
        ControllersWorkerClass.start();
    }//GEN-LAST:event_jButtonStartWorkerActionPerformed

    private void jButtonStopWorkerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonStopWorkerActionPerformed
        ControllersWorkerClass.stop();
    }//GEN-LAST:event_jButtonStopWorkerActionPerformed

    private void jButtonStartMatchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonStartMatchActionPerformed
        startMatch();
        jTabbedPane1.setSelectedIndex(2);
        updateButtons(STATUS_FIGHTING);
    }//GEN-LAST:event_jButtonStartMatchActionPerformed

    private void jButtonPauseMatchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonPauseMatchActionPerformed
        pauseMatch();
        updateButtons(STATUS_BREAKTIME);
    }//GEN-LAST:event_jButtonPauseMatchActionPerformed

    private void jButtonStopMatchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonStopMatchActionPerformed
        stopMatch();
        updateButtons(STATUS_STOPPED);
    }//GEN-LAST:event_jButtonStopMatchActionPerformed

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        saveLog();
    }//GEN-LAST:event_jButton4ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        clearLog();
    }//GEN-LAST:event_jButton3ActionPerformed

    private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed
        copyLogToClipboard();
    }//GEN-LAST:event_jButton12ActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        printLog();
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jButtonResetMatchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonResetMatchActionPerformed
        resetMatch();
        updateButtons(STATUS_RESETTED);
    }//GEN-LAST:event_jButtonResetMatchActionPerformed

    private void jButtonResetConfigActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonResetConfigActionPerformed
        resetConfig();
    }//GEN-LAST:event_jButtonResetConfigActionPerformed

    private void jComboBoxJ1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxJ1ActionPerformed
        bindRefereeAndHardware();
    }//GEN-LAST:event_jComboBoxJ1ActionPerformed

    private void jComboBoxJ2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxJ2ActionPerformed
        bindRefereeAndHardware();
    }//GEN-LAST:event_jComboBoxJ2ActionPerformed

    private void jComboBoxJ3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxJ3ActionPerformed
        bindRefereeAndHardware();
    }//GEN-LAST:event_jComboBoxJ3ActionPerformed

    private void jComboBoxJ4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxJ4ActionPerformed
        bindRefereeAndHardware();
    }//GEN-LAST:event_jComboBoxJ4ActionPerformed

    private void jButtonBoardColorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBoardColorActionPerformed
        JColorChooser tcc = new JColorChooser();
        //tcc.getSelectionModel().addChangeListener(this);
        tcc.setBorder(BorderFactory.createTitledBorder("Choose Text Color"));

        //Remove the preview panel
        //tcc.setPreviewPanel(new JPanel());

        //Override the chooser panels with our own
        //AbstractColorChooserPanel panels[] = { new CrayonPanel() };
        //tcc.setChooserPanels(panels);
        //cc.setColor(banner.getForeground());

        //add(bannerPanel, BorderLayout.PAGE_START);
        //add(panel, BorderLayout.CENTER);
        //add(tcc, BorderLayout.PAGE_END);

        Color newColor = JColorChooser.showDialog(
                tcc,
                "Choose Background Color",
                null);

    }//GEN-LAST:event_jButtonBoardColorActionPerformed

    private void jButtonBoardColor1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBoardColor1ActionPerformed
        JColorChooser tcc = new JColorChooser();
        //tcc.getSelectionModel().addChangeListener(this);
        tcc.setBorder(BorderFactory.createTitledBorder("Choose Text Color"));
        Color newColor = JColorChooser.showDialog(
                tcc,
                "Choose Background Color",
                null);
    }//GEN-LAST:event_jButtonBoardColor1ActionPerformed

    private void rLinkLabel2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rLinkLabel2MouseClicked
        TkdGlobal.openWebPage("http://www.gnu.org/licenses/gpl.html");
    }//GEN-LAST:event_rLinkLabel2MouseClicked

    private void rLinkLabel4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rLinkLabel4MouseClicked
        TkdGlobal.openWebPage("http://www.iubar.it/borgogelli");
    }//GEN-LAST:event_rLinkLabel4MouseClicked

    private void rLinkLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rLinkLabel1MouseClicked
        TkdGlobal.openWebPage("http://code.google.com/p/taekwondo-score");
    }//GEN-LAST:event_rLinkLabel1MouseClicked

    private void rLinkLabel3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rLinkLabel3MouseClicked
        TkdGlobal.openWebPage("http://www.taekwondofano.it");
    }//GEN-LAST:event_rLinkLabel3MouseClicked

    private void rLinkLabel5MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rLinkLabel5MouseClicked
        TkdGlobal.openWebPage("http://www.wtf.org/wtf_eng/site/rules/rules.html");
    }//GEN-LAST:event_rLinkLabel5MouseClicked

    private void rLinkLabel6MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_rLinkLabel6MouseClicked
        TkdGlobal.openWebPage("http://www.youtube.com/watch?v=c4vTv2mrPBg"); // yout tube
    }//GEN-LAST:event_rLinkLabel6MouseClicked

    private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox1ActionPerformed
        int index = jComboBox1.getSelectedIndex();
        applyColorConfig(index);
    }//GEN-LAST:event_jComboBox1ActionPerformed

    private void jButtonBoardColor2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBoardColor2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonBoardColor2ActionPerformed

    private void jButtonBoardColor3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonBoardColor3ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonBoardColor3ActionPerformed

    private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed
        boolean b = jCheckBox1.isSelected();
        jLabelTime.setVisible(b);
    }//GEN-LAST:event_jCheckBox1ActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButtonApplyConfig;
    private javax.swing.JButton jButtonBoardColor;
    private javax.swing.JButton jButtonBoardColor1;
    private javax.swing.JButton jButtonBoardColor2;
    private javax.swing.JButton jButtonBoardColor3;
    private javax.swing.JButton jButtonClearBoard;
    private javax.swing.JButton jButtonHwDetect;
    private javax.swing.JButton jButtonHwTest;
    private javax.swing.JButton jButtonLoadConfig;
    private javax.swing.JButton jButtonPauseMatch;
    private javax.swing.JButton jButtonPauseTimer;
    private javax.swing.JButton jButtonRandomBoard;
    private javax.swing.JButton jButtonResetConfig;
    private javax.swing.JButton jButtonResetMatch;
    private javax.swing.JButton jButtonResetTimer;
    private javax.swing.JButton jButtonSaveConfig;
    private javax.swing.JButton jButtonStartMatch;
    private javax.swing.JButton jButtonStartTimer;
    private javax.swing.JButton jButtonStartWorker;
    private javax.swing.JButton jButtonStopMatch;
    private javax.swing.JButton jButtonStopTimer;
    private javax.swing.JButton jButtonStopWorker;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JComboBox jComboBoxJ1;
    private javax.swing.JComboBox jComboBoxJ2;
    private javax.swing.JComboBox jComboBoxJ3;
    private javax.swing.JComboBox jComboBoxJ4;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel46;
    private javax.swing.JLabel jLabel47;
    private javax.swing.JLabel jLabel48;
    private javax.swing.JLabel jLabel49;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel51;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel57;
    private javax.swing.JLabel jLabel58;
    private javax.swing.JLabel jLabel59;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel60;
    private javax.swing.JLabel jLabel61;
    private javax.swing.JLabel jLabel62;
    private javax.swing.JLabel jLabel63;
    private javax.swing.JLabel jLabel64;
    private javax.swing.JLabel jLabel65;
    private javax.swing.JLabel jLabel66;
    private javax.swing.JLabel jLabel67;
    private javax.swing.JLabel jLabel68;
    private javax.swing.JLabel jLabel69;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel70;
    private javax.swing.JLabel jLabel71;
    private javax.swing.JLabel jLabel72;
    private javax.swing.JLabel jLabel73;
    private javax.swing.JLabel jLabel74;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabelBlueName;
    private javax.swing.JLabel jLabelBluePenality;
    private javax.swing.JLabel jLabelBluePoint;
    private javax.swing.JLabel jLabelJ1;
    private javax.swing.JLabel jLabelJ2;
    private javax.swing.JLabel jLabelJ3;
    private javax.swing.JLabel jLabelJ4;
    private javax.swing.JLabel jLabelMatchName;
    private javax.swing.JLabel jLabelR1;
    private javax.swing.JLabel jLabelR1Icon;
    private javax.swing.JLabel jLabelR2;
    private javax.swing.JLabel jLabelR2Icon;
    private javax.swing.JLabel jLabelR3;
    private javax.swing.JLabel jLabelR3Icon;
    private javax.swing.JLabel jLabelR4;
    private javax.swing.JLabel jLabelR4Icon;
    private javax.swing.JLabel jLabelRedName;
    private javax.swing.JLabel jLabelRedPenality;
    private javax.swing.JLabel jLabelRedPoint;
    private javax.swing.JLabel jLabelRound;
    private javax.swing.JLabel jLabelTime;
    private javax.swing.JList jList1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JPanel jPanelAbout;
    private javax.swing.JPanel jPanelBoard;
    private javax.swing.JPanel jPanelBoardCenter;
    private javax.swing.JPanel jPanelBoardScore;
    private javax.swing.JPanel jPanelBoardScoreSouth;
    private javax.swing.JPanel jPanelBoardScoreTop;
    private javax.swing.JPanel jPanelClock;
    private javax.swing.JPanel jPanelConfig;
    private javax.swing.JPanel jPanelConfigCenter;
    private javax.swing.JPanel jPanelDiag;
    private javax.swing.JPanel jPanelDiagCenter;
    private javax.swing.JPanel jPanelLogs;
    private javax.swing.JPanel jPanelRing2;
    private javax.swing.JPanel jPanelRing2Center;
    private javax.swing.JPanel jPanelScore;
    private javax.swing.JPanel jPanelTimer;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTextArea jTextArea2;
    private javax.swing.JTextField jTextFieldBackground1;
    private javax.swing.JTextField jTextFieldBackground2;
    private javax.swing.JTextField jTextFieldBackground3;
    private javax.swing.JTextField jTextFieldBackground4;
    private javax.swing.JTextField jTextFieldBlue1;
    private javax.swing.JTextField jTextFieldBlue2;
    private javax.swing.JTextField jTextFieldBlueName;
    private javax.swing.JTextField jTextFieldBluePenality1;
    private javax.swing.JTextField jTextFieldBluePenality2;
    private javax.swing.JTextField jTextFieldBreakTime;
    private javax.swing.JTextField jTextFieldBreakTime1;
    private javax.swing.JTextField jTextFieldClockFontSize;
    private javax.swing.JTextField jTextFieldCurrRound;
    private javax.swing.JTextField jTextFieldJ1;
    private javax.swing.JTextField jTextFieldJ2;
    private javax.swing.JTextField jTextFieldJ3;
    private javax.swing.JTextField jTextFieldJ4;
    private javax.swing.JTextField jTextFieldJudges;
    private javax.swing.JTextField jTextFieldJudges1;
    private javax.swing.JTextField jTextFieldLeadPoints;
    private javax.swing.JTextField jTextFieldMatchId;
    private javax.swing.JTextField jTextFieldMatchName;
    private javax.swing.JTextField jTextFieldMaxPoints;
    private javax.swing.JTextField jTextFieldR1;
    private javax.swing.JTextField jTextFieldR2;
    private javax.swing.JTextField jTextFieldR3;
    private javax.swing.JTextField jTextFieldR4;
    private javax.swing.JTextField jTextFieldRed1;
    private javax.swing.JTextField jTextFieldRed2;
    private javax.swing.JTextField jTextFieldRedName;
    private javax.swing.JTextField jTextFieldRedPenality1;
    private javax.swing.JTextField jTextFieldRedPenality2;
    private javax.swing.JTextField jTextFieldRoundCurrTimeMm;
    private javax.swing.JTextField jTextFieldRoundCurrTimeSs;
    private javax.swing.JTextField jTextFieldRoundTimeMm;
    private javax.swing.JTextField jTextFieldRoundTimeSs;
    private javax.swing.JTextField jTextFieldRounds;
    private javax.swing.JTextField jTextFieldShort1;
    private javax.swing.JTextField jTextFieldShort2;
    private javax.swing.JTextField jTextFieldShort3;
    private javax.swing.JTextField jTextFieldShort4;
    private javax.swing.JTextField jTextFieldSleepTime;
    private javax.swing.JTextField jTextFieldValidityTime;
    private javax.swing.JTextField jTextFieldValidityTime1;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JToolBar jToolBar2;
    private javax.swing.JToolBar jToolBar3;
    private javax.swing.JToolBar jToolBar4;
    private javax.swing.JToolBar jToolBar5;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JProgressBar progressBar;
    private it.iubar.swing.beans.simple.RLinkLabel rLinkLabel1;
    private it.iubar.swing.beans.simple.RLinkLabel rLinkLabel2;
    private it.iubar.swing.beans.simple.RLinkLabel rLinkLabel3;
    private it.iubar.swing.beans.simple.RLinkLabel rLinkLabel4;
    private it.iubar.swing.beans.simple.RLinkLabel rLinkLabel5;
    private it.iubar.swing.beans.simple.RLinkLabel rLinkLabel6;
    private javax.swing.JLabel statusAnimationLabel;
    private javax.swing.JLabel statusMessageLabel;
    private javax.swing.JPanel statusPanel;
    // End of variables declaration//GEN-END:variables
    private final Timer messageTimer;
    private final Timer busyIconTimer;
    private final Icon idleIcon;
    private final Icon[] busyIcons = new Icon[15];
    private int busyIconIndex = 0;
    private JDialog aboutBox;

    private void myInit() {
        menuBar.setVisible(false);
//RingCanvas ring = new RingCanvas();
//jPanelRingCenter.setLayout(new BorderLayout());
//jPanelRingCenter.add(ring, java.awt.BorderLayout.CENTER);
        clock = new Clock2();
        jPanelClock.setLayout(new BorderLayout());
        jPanelClock.add(clock, java.awt.BorderLayout.CENTER);
        //clock.start();
        jButtonStartWorker.setVisible(false);
        jButtonStopWorker.setVisible(false);
        setRefereeGuiEnabled(false);

        initGui();
        initGui2();
        _initHwGui();

        loadConfig();
        applyConfig();

        setClockToolbarEnabled(false);
        redQueue = new ArrayList();
        blueQueue = new ArrayList();
        ControllersWorkerClass.start();

    }

    public JTextField getFieldMm() {
        return jTextFieldRoundCurrTimeMm;
    }

    public JTextField getFieldSs() {
        return jTextFieldRoundCurrTimeSs;
    }

    public JLabel getTimeLabel1() {
        return jLabel10;
    }

    public JLabel getTimeLabel2() {
        return jLabelTime;
    }

    private void updateScore() {
        String str_blue_score = String.valueOf(Logic.blue_score);
        String str_red_score = String.valueOf(Logic.red_score);

// Config panel
        jTextFieldBlue1.setText(str_blue_score);
        jTextFieldRed1.setText(str_red_score);
        jTextFieldRedPenality1.setText(String.valueOf(Logic.red_penalities_1));
        jTextFieldRedPenality2.setText(String.valueOf(Logic.red_penalities_2));
        jTextFieldBluePenality1.setText(String.valueOf(Logic.blue_penalities_1));
        jTextFieldBluePenality2.setText(String.valueOf(Logic.blue_penalities_2));

// Board panel        
        jLabelBluePoint.setText(str_blue_score);
        jLabelRedPoint.setText(str_red_score);
        String red_p = String.valueOf(Logic.red_penalities_1) + "-" + String.valueOf(Logic.red_penalities_2);
        String blue_p = String.valueOf(Logic.blue_penalities_1) + "-" + String.valueOf(Logic.blue_penalities_2);
        if (Logic.red_penalities_1 > 0 || Logic.red_penalities_2 > 0) {
            jLabelRedPenality.setText(red_p);
        } else {
            jLabelRedPenality.setText("");
        }
        if (Logic.blue_penalities_1 > 0 || Logic.blue_penalities_2 > 0) {
            jLabelBluePenality.setText(blue_p);
        } else {
            jLabelBluePenality.setText("");
        }

    }

    public void addPoint(int player, int points) {
        if (player == Logic.RED) {
            logPoint(Logic.RED, points);
            Logic.red_score = Logic.red_score + points;
        } else if (player == Logic.BLUE) {
            logPoint(Logic.BLUE, points);
            Logic.blue_score = Logic.blue_score + points;
        }
        updateScore();
    }

    private void logPoint(int player, int points) {
        clearQueue(player);
        String str = getTimestampToLog() + " | Match (" + getMatchToLog() + ") | Round " + getRoundToLog() + " at " + getMatchTime() + " | Gived " + points + " points to player " + getSubjectToLog(player);
        addLogToTextArea(str);
    }

    private void logHIT(int player, int hw_index, int points) {
        String str = getTimestampToLog() + " | Match (" + getMatchToLog() + ") | Round " + getRoundToLog() + " at " + getMatchTime() + " | Set " + points + " points to player " + getSubjectToLog(player) + " from referee " + getRefereeToLog(hw_index) + " | hardware is " + getControllerToLog(hw_index);
        addLogToTextArea(str);
    }

    private void hit(int player, int hw_index, int points) {
        System.out.println("hit...");
        try {

            String str = getTimestampToLog() + " | Match (" + getMatchToLog() + ") | Round " + getRoundToLog() + " at " + getMatchTime() + " | Clicked " + points + " points to player " + getSubjectToLog(player) + " from referee " + getRefereeToLog(hw_index) + " | hardware is " + getControllerToLog(hw_index);
            addLogToTextArea(str);

            List list = new ArrayList();
            long time = (new Date()).getTime();
            list.add(points);
            list.add(hw_index);
            list.add(time);
            addToQueue(player, list);
            checkQueue(player);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    private void clearPoints() {
        Logic.blue_score = 0;
        Logic.red_score = 0;
        Logic.blue_score = 0;
        Logic.blue_penalities_1 = 0;
        Logic.blue_penalities_2 = 0;
        Logic.red_penalities_1 = 0;
        Logic.red_penalities_2 = 0;
// COnfig panel
        jTextFieldBlue1.setText("0");
        jTextFieldRed1.setText("0");
        jTextFieldRedPenality1.setText("0");
        jTextFieldRedPenality2.setText("0");
        jTextFieldBluePenality1.setText("0");
        jTextFieldBluePenality2.setText("0");


        // Board panel
        updateScore();
    }

    private void applyConfig() {
        clearPoints();
        String str_red_score = jTextFieldRed1.getText();
        String str_blue_score = jTextFieldBlue1.getText();
        Logic.red_score = toInteger(str_red_score);
        Logic.red_penalities_1 = toInteger(jTextFieldRedPenality1.getText());
        Logic.red_penalities_2 = toInteger(jTextFieldRedPenality2.getText());
        Logic.blue_score = toInteger(str_blue_score);
        Logic.blue_penalities_1 = toInteger(jTextFieldBluePenality1.getText());
        Logic.blue_penalities_2 = toInteger(jTextFieldBluePenality2.getText());

        updateScore();

        String blue_name = jTextFieldBlueName.getText();
        String red_name = jTextFieldRedName.getText();
        String match_name = jTextFieldMatchName.getText();

        jLabelBlueName.setText(blue_name);
        jLabelRedName.setText(red_name);
        jLabelMatchName.setText(match_name);

        String str_mm = jTextFieldRoundCurrTimeMm.getText();
        String str_ss = jTextFieldRoundCurrTimeSs.getText();
        String str_curr_round = jTextFieldCurrRound.getText();
        String str_break_time = jTextFieldBreakTime.getText();
        String str_break_time1 = jTextFieldBreakTime1.getText();
        String str_round_time = jTextFieldRoundTimeMm.getText();
        String str_round_time1 = jTextFieldRoundTimeSs.getText();
        Integer mm = toInteger(str_mm);
        Integer ss = toInteger(str_ss);

        Logic.lead_points = toInteger(jTextFieldLeadPoints.getText());
        Logic.max_points = toInteger(jTextFieldMaxPoints.getText());

        setClockFontSize(toInteger(jTextFieldClockFontSize.getText()));

        this.clock.setTime(ss, mm, 0);

        initSquareGui();
        updateRefereeGui();
        updateSquareGui();
        setEasterEgg(true);

        this.referees_count = getJudgesNumSelected();
        this.interim_num = getInterimNumSelected();
        checkConfig();
    }

    private void loadConfig() {
        File f = TkdGlobal.getConfigFile();
        // Read properties file.
        if (f.exists()) {
            Properties prop = new Properties();
            FileInputStream fis = null;
            try {
                prop.load(fis = new FileInputStream(f));

                String round_time_mm = prop.getProperty("round_time_mm");
                String round_time_ss = prop.getProperty("round_time_ss");
                String rounds_number = prop.getProperty("rounds_number");

                String break_time_mm = prop.getProperty("break_time_mm");
                String break_time_ss = prop.getProperty("break_time_ss");

                String judges_number = prop.getProperty("judges_number", String.valueOf(Logic.DEF_JUDGES_NUM));
                String interim_number = prop.getProperty("interim_number", String.valueOf(Logic.DEF_INTERIM_NUM));

                String blue_name = prop.getProperty("blue_name");
                String red_name = prop.getProperty("red_name");
                String match_name = prop.getProperty("match_name");

                String point_lease_time = prop.getProperty("point_lease_time", String.valueOf(Logic.POINT_LEASE_TIME));
                String min_click_interval = prop.getProperty("min_click_interval", String.valueOf(Logic.MIN_CLICK_TIME_INTERVAL));
                String thread_sleep_time = prop.getProperty("thread_sleep_time", String.valueOf(Logic.POLLING_DELAY));
                String background_color = prop.getProperty("background_color", String.valueOf(Logic.DEFAULT_BACKGROUND_COLOR));

                String referee1_name = prop.getProperty("referee1_name");
                String referee2_name = prop.getProperty("referee2_name");
                String referee3_name = prop.getProperty("referee3_name");
                String referee4_name = prop.getProperty("referee4_name");

                String referee1_hw_index = prop.getProperty("referee1_hw_index");
                String referee2_hw_index = prop.getProperty("referee2_hw_index");
                String referee3_hw_index = prop.getProperty("referee3_hw_index");
                String referee4_hw_index = prop.getProperty("referee4_hw_index");

                String button_r1 = prop.getProperty("button_r1", String.valueOf(KeyMapping.CONST_LEFT_BOTTOM));
                String button_r2 = prop.getProperty("button_r2", String.valueOf(KeyMapping.CONST_LEFT_TOP));
                String button_r3 = prop.getProperty("button_r3", String.valueOf(KeyMapping.CONST_RIGHT_BOTTOM));
                String button_r4 = prop.getProperty("button_r4", String.valueOf(KeyMapping.CONST_RIGHT_TOP));
                String button_short1 = prop.getProperty("button_short1", String.valueOf(KeyMapping.CONST_SHORTCUT_1));
                String button_short2 = prop.getProperty("button_short2", String.valueOf(KeyMapping.CONST_SHORTCUT_2));
                String button_short3 = prop.getProperty("button_short3", String.valueOf(KeyMapping.CONST_SHORTCUT_3));
                String button_short4 = prop.getProperty("button_short4", String.valueOf(KeyMapping.CONST_SHORTCUT_4));

                String lead_points = prop.getProperty("lead_points", String.valueOf(Logic.DEF_LEAD_POINTS));
                String max_points = prop.getProperty("max_points", String.valueOf(Logic.DEF_MAX_POINTS));
                String clock_font_size = prop.getProperty("clock_font_size", String.valueOf(DEF_CLOCK_FONT_SIZE));

                jTextFieldLeadPoints.setText(lead_points);
                jTextFieldMaxPoints.setText(max_points);
                jTextFieldClockFontSize.setText(clock_font_size);

                jTextFieldR1.setText(button_r1);
                jTextFieldR2.setText(button_r2);
                jTextFieldR3.setText(button_r3);
                jTextFieldR4.setText(button_r4);
                jTextFieldShort1.setText(button_short1);
                jTextFieldShort2.setText(button_short2);
                jTextFieldShort3.setText(button_short3);
                jTextFieldShort4.setText(button_short4);

                applyButtonsConfig();

                jTextFieldRoundTimeMm.setText(round_time_mm);
                jTextFieldRoundTimeSs.setText(round_time_ss);
                jTextFieldBreakTime.setText(break_time_mm);
                jTextFieldBreakTime1.setText(break_time_ss);

                jTextFieldRounds.setText(rounds_number);
                jTextFieldValidityTime.setText(point_lease_time);
                jTextFieldValidityTime1.setText(min_click_interval);

                jTextFieldJudges.setText(judges_number);
                jTextFieldJudges1.setText(interim_number);
                jTextFieldBlueName.setText(blue_name);
                jTextFieldRedName.setText(red_name);

                jTextFieldMatchName.setText(match_name);
                jTextFieldSleepTime.setText(thread_sleep_time);
                jTextFieldBackground1.setText(background_color);

                jTextFieldJ1.setText(referee1_name);
                jTextFieldJ2.setText(referee2_name);
                jTextFieldJ3.setText(referee3_name);
                jTextFieldJ4.setText(referee4_name);

                comboSetSelectedIndex(jComboBoxJ1, referee1_hw_index);
                comboSetSelectedIndex(jComboBoxJ2, referee2_hw_index);
                comboSetSelectedIndex(jComboBoxJ3, referee3_hw_index);
                comboSetSelectedIndex(jComboBoxJ4, referee4_hw_index);

                jCheckBox1.setSelected(true); // DEFAULT
                jComboBox1.setSelectedIndex(1);

                fis.close();
                printOnStatusbar("Configuration loaded");
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    private void setEasterEgg(boolean b) {
        String replace = ":-(";
        String name1 = "ucco";
        String name2 = "abrizio";
        Iterator it = this.fields.iterator();
        while (it.hasNext()) {
            JTextField textfield = (JTextField) it.next();
            String str = textfield.getText();
            if (str != null) {
                if (str.toLowerCase().indexOf(name1) > 0) {
                    textfield.setText(replace);
                } else if (str.toLowerCase().indexOf(name2) > 0) {
                    textfield.setText(replace);
                }
            }
        }
    }

    private void saveConfig() {

        File f = TkdGlobal.getConfigFile();
        // Write properties file.
        Properties prop = new Properties();
        FileOutputStream fos = null;
        try {
            // Setting a key=value pair

            String round_time_mm = jTextFieldRoundTimeMm.getText();
            String round_time_ss = jTextFieldRoundTimeSs.getText();
            String break_time_mm = jTextFieldBreakTime.getText();
            String break_time_ss = jTextFieldBreakTime1.getText();
            String rounds_number = jTextFieldRounds.getText();
            String point_lease_time = jTextFieldValidityTime.getText();
            String min_click_interval = jTextFieldValidityTime1.getText();
            String judges_number = jTextFieldJudges.getText();
            String interim_number = jTextFieldJudges1.getText();
            String thread_sleep_time = jTextFieldSleepTime.getText();
            String blue_name = jTextFieldBlueName.getText();
            String red_name = jTextFieldRedName.getText();
            String match_name = jTextFieldMatchName.getText();
            String background_color = jTextFieldBackground1.getText();
            String referee1_name = jTextFieldJ1.getText();
            String referee2_name = jTextFieldJ2.getText();
            String referee3_name = jTextFieldJ3.getText();
            String referee4_name = jTextFieldJ4.getText();

            String lead_points = jTextFieldLeadPoints.getText();
            String max_points = jTextFieldMaxPoints.getText();
            String clock_font_size = jTextFieldClockFontSize.getText();

            prop.getProperty("lead_points", lead_points);
            prop.getProperty("max_points", max_points);
            prop.getProperty("clock_font_size", clock_font_size);

            int referee1_hw_index = jComboBoxJ1.getSelectedIndex();
            int referee2_hw_index = jComboBoxJ2.getSelectedIndex();
            int referee3_hw_index = jComboBoxJ3.getSelectedIndex();
            int referee4_hw_index = jComboBoxJ4.getSelectedIndex();

            prop.setProperty("rounds_number", rounds_number);
            prop.setProperty("round_time_mm", round_time_mm);
            prop.setProperty("round_time_ss", round_time_ss);
            prop.setProperty("break_time_mm", break_time_mm);
            prop.setProperty("break_time_ss", break_time_ss);
            prop.setProperty("judges_number", judges_number);
            prop.setProperty("interim_number", interim_number);
            prop.setProperty("blue_name", blue_name);
            prop.setProperty("red_name", red_name);
            prop.setProperty("match_name", match_name);

            prop.setProperty("point_lease_time", point_lease_time);
            prop.setProperty("min_click_interval", min_click_interval);
            prop.setProperty("thread_sleep_time", thread_sleep_time);
            prop.setProperty("background_color", background_color);

            prop.setProperty("referee1_name", referee1_name);
            prop.setProperty("referee2_name", referee2_name);
            prop.setProperty("referee3_name", referee3_name);
            prop.setProperty("referee4_name", referee4_name);

            prop.setProperty("referee1_hw_index", String.valueOf(referee1_hw_index));
            prop.setProperty("referee2_hw_index", String.valueOf(referee2_hw_index));
            prop.setProperty("referee3_hw_index", String.valueOf(referee3_hw_index));
            prop.setProperty("referee4_hw_index", String.valueOf(referee4_hw_index));

            String button_r1 = jTextFieldR1.getText();
            String button_r2 = jTextFieldR2.getText();
            String button_r3 = jTextFieldR3.getText();
            String button_r4 = jTextFieldR4.getText();
            String button_short1 = jTextFieldShort1.getText();
            String button_short2 = jTextFieldShort2.getText();
            String button_short3 = jTextFieldShort3.getText();
            String button_short4 = jTextFieldShort4.getText();


            prop.setProperty("button_r1", button_r1);
            prop.setProperty("button_r2", button_r2);
            prop.setProperty("button_r3", button_r3);
            prop.setProperty("button_r4", button_r4);
            prop.setProperty("button_short1", button_short1);
            prop.setProperty("button_short2", button_short2);
            prop.setProperty("button_short3", button_short3);
            prop.setProperty("button_short4", button_short4);

            prop.store(fos = new FileOutputStream(f), "Author: Andrea Borgogelli Avveduti");
            fos.close();
            TkdGlobal.showInfo("Configuration saved");

        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public Integer getRoundSeconds() {
        String str_mm = jTextFieldRoundTimeMm.getText();
        String str_ss = jTextFieldRoundTimeSs.getText();
        Integer mm = toInteger(str_mm);
        Integer ss = toInteger(str_ss);
        Integer mm_as_ss = mm * 60;
        Integer tot = mm_as_ss + ss;
        return tot;
    }

    public int getBreakSeconds() {
        String str_mm = jTextFieldBreakTime.getText();
        String str_ss = jTextFieldBreakTime1.getText();
        Integer mm = toInteger(str_mm);
        Integer ss = toInteger(str_ss);
        Integer mm_as_ss = mm * 60;
        Integer tot = mm_as_ss + ss;
        return tot;
    }

    private void showData(List list) {
        jList1.setModel(new DefaultListModel());
        DefaultListModel listModel = new DefaultListModel();

        String txt = "";
        if (list != null) {
            Iterator it = list.iterator();
            while (it.hasNext()) {
                List array = (List) it.next();
                String name = (String) array.get(0);
                Object obj = array.get(1);
                String type = "unknown";
                if (obj != null) {
                    type = obj.toString();
                }
                String elem = name + " " + "(" + type + ")";
                txt = txt + elem + NEWLINE;
                listModel.addElement(elem);

            }
        }
        jList1.setModel(listModel);

    }

    public void hitLeft(int hw_index, int points) {
        hit(Logic.RED, hw_index, points);
    }

    public void hitRight(int hw_index, int points) {
        hit(Logic.BLUE, hw_index, points);
    }

    private void _fillControllersInfo() {
        List list = TkdGlobal._getControllerList(getFrame());
        showData(list);
    }

    private void updateRefereeGui() { // to invoke only after hw detection

        int num = getJudgesNumFromCache();

        boolean b = true;
        for (int i = 0; i < num; i++) {
            JTextField field = (JTextField) fields.get(i);
            field.setEnabled(b);
            JComboBox combo = (JComboBox) combos.get(i);
            combo.setEnabled(b);
            //combo.setSelectedIndex(-1);
            JLabel label = (JLabel) labels.get(i);
            Icon icon = icon = my_resourceMap.getIcon("lightbulb_on.icon");
            label.setIcon(icon);
        }

    }

    private void initGui() {


        fields.add(jTextFieldJ1);
        fields.add(jTextFieldJ2);
        fields.add(jTextFieldJ3);
        fields.add(jTextFieldJ4);

        combos.add(jComboBoxJ1);
        combos.add(jComboBoxJ2);
        combos.add(jComboBoxJ3);
        combos.add(jComboBoxJ4);

        labels.add(jLabelJ1);
        labels.add(jLabelJ2);
        labels.add(jLabelJ3);
        labels.add(jLabelJ4);

        keylabels.add(jLabelR1);
        keylabels.add(jLabelR2);
        keylabels.add(jLabelR3);
        keylabels.add(jLabelR4);

    }

    private void setRefereeGuiEnabled(boolean b) {
        Iterator it1 = fields.iterator();
        Iterator it2 = combos.iterator();
        Iterator it3 = labels.iterator();

        while (it1.hasNext()) {
            JTextField field = (JTextField) it1.next();
            field.setEnabled(b);
        }
        while (it2.hasNext()) {
            JComboBox combo = (JComboBox) it2.next();
            combo.setEnabled(b);
            combo.setSelectedIndex(-1);
        }

        while (it3.hasNext()) {
            JLabel label = (JLabel) it3.next();
            Icon icon = null;
            if (b) {
                icon = my_resourceMap.getIcon("lightbulb_on.icon");
            } else {
                icon = my_resourceMap.getIcon("lightbulb.icon");
            }
            label.setIcon(icon);
        }

    }

    private void initSquareGui() {
        int n = getJudgesNumFromCache();
        JLabel[] refereeIcons = {jLabelR1Icon, jLabelR2Icon, jLabelR3Icon, jLabelR4Icon};
        Icon off_icon = my_resourceMap.getIcon("lightbulb.icon");
        Icon on_icon = my_resourceMap.getIcon("lightbulb_on.icon");
        for (int i = 0; i < refereeIcons.length; i++) {
            JLabel jLabel = refereeIcons[i];
            jLabel.setIcon(off_icon);
        }
        for (int i = 0; i < n; i++) {
            JLabel jLabel = refereeIcons[i];
            jLabel.setIcon(on_icon);
        }
    }

    private void setGuiStyle(int type) {
        boolean b = false;
        if (type == STATUS_STOPPED) {
            b = true;
        } else if (type == STATUS_FIGHTING) {

            b = false;

        } else if (type == STATUS_BREAKTIME) {
            b = false;
        }

        setMatchGuiEnabled(b);
        setPlayerGuiEnabled(b);
        setJudgesGuiEnabled(b);
        updateButtons(type);

    }

    private void initGui2() {

        jTextFieldR1.setEnabled(false);
        jTextFieldR2.setEnabled(false);
        jTextFieldR3.setEnabled(false);
        jTextFieldR4.setEnabled(false);

        jTextFieldShort1.setEnabled(false);
        jTextFieldShort2.setEnabled(false);
        jTextFieldShort3.setEnabled(false);
        jTextFieldShort4.setEnabled(false);
    }

    public void resetConfig() {

        jTextFieldR1.setText("" + KeyMapping.CONST_LEFT_BOTTOM);
        jTextFieldR2.setText("" + KeyMapping.CONST_LEFT_TOP);
        jTextFieldR3.setText("" + KeyMapping.CONST_RIGHT_BOTTOM);
        jTextFieldR4.setText("" + KeyMapping.CONST_RIGHT_TOP);

        jTextFieldShort1.setText("" + KeyMapping.CONST_SHORTCUT_1);
        jTextFieldShort2.setText("" + KeyMapping.CONST_SHORTCUT_2);
        jTextFieldShort3.setText("" + KeyMapping.CONST_SHORTCUT_3);
        jTextFieldShort4.setText("" + KeyMapping.CONST_SHORTCUT_4);

        KeyMapping.CONFIG_LEFT_BOTTOM = KeyMapping.CONST_LEFT_BOTTOM;
        KeyMapping.CONFIG_LEFT_TOP = KeyMapping.CONST_LEFT_TOP;
        KeyMapping.CONFIG_RIGHT_BOTTOM = KeyMapping.CONST_RIGHT_BOTTOM;
        KeyMapping.CONFIG_RIGHT_TOP = KeyMapping.CONST_RIGHT_TOP;
        KeyMapping.CONFIG_SHORTCUT_1 = KeyMapping.CONST_SHORTCUT_1;
        KeyMapping.CONFIG_SHORTCUT_2 = KeyMapping.CONST_SHORTCUT_2;
        KeyMapping.CONFIG_SHORTCUT_3 = KeyMapping.CONST_SHORTCUT_3;
        KeyMapping.CONFIG_SHORTCUT_4 = KeyMapping.CONST_SHORTCUT_4;

        jTextFieldSleepTime.setText(String.valueOf(Logic.POLLING_DELAY));
        jTextFieldValidityTime.setText(String.valueOf(Logic.POINT_LEASE_TIME));
        jTextFieldValidityTime1.setText(String.valueOf(Logic.MIN_CLICK_TIME_INTERVAL));
        jTextFieldBackground1.setText(String.valueOf(Logic.DEFAULT_BACKGROUND_COLOR));

        jTextFieldClockFontSize.setText(String.valueOf(DEF_CLOCK_FONT_SIZE));

        jTextFieldLeadPoints.setText(String.valueOf(Logic.DEF_LEAD_POINTS));
        jTextFieldMaxPoints.setText(String.valueOf(Logic.DEF_MAX_POINTS));

        this.referees_count = _calcJudgesNum();
        jTextFieldJudges.setText(String.valueOf(referees_count));
        this.interim_num = _calcInterim();
        jTextFieldJudges1.setText(String.valueOf(this.interim_num));
    }

    private int getMin(int n, int limit) {
        int result = -1;
        if (n < limit) {
            result = n;
        } else {
            result = limit;
        }
        return result;
    }

    private int getMax(int n, int limit) {
        int result = -1;
        if (n > limit) {
            result = n;
        } else {
            result = limit;
        }
        return result;
    }

    void clearTestLabels() {
        Iterator it3 = keylabels.iterator();
        while (it3.hasNext()) {
            JLabel object = (JLabel) it3.next();
            Icon icon = my_resourceMap.getIcon("lightbulb.icon");
            object.setIcon(icon);
        }
    }

    void setTestLabel(int i, boolean b) {
        JLabel label = (JLabel) keylabels.get(i);
        if (label != null) {
            Icon icon = null;
            if (b) {
                icon = my_resourceMap.getIcon("lightbulb_on.icon");
            } else {
                icon = my_resourceMap.getIcon("lightbulb.icon");
            }
            label.setIcon(icon);
        }
    }

    private void saveLog() {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    private void clearLog() {
        jTextArea2.setText("");
        jTextArea2.setCaretPosition(0);
    }

    private void copyLogToClipboard() {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    private void printLog() {
        throw new UnsupportedOperationException("Not yet implemented");
    }

    private void startMatch() {
        log(getTimestampToLog() + ": Match (" + getMatchToLog() + ") started");
        clearQueues();
        clock.start();
    }

    private void pauseMatch() {
        log(getTimestampToLog() + ": Match (" + getMatchToLog() + ") paused");
        clock.pause();
    }

    public void stopMatch() {
        log(getTimestampToLog() + ": Match (" + getMatchToLog() + ") stopped");
        clock.stop();
    }

    private void resetMatch() {
        log(getTimestampToLog() + ": Match (" + getMatchToLog() + ") resetted");
        clearQueues();
        clearPoints();
        clock.reset();
    }

    private int getInterimNumSelected() {
        int _interim_num = 0;
        String str_j = jTextFieldJudges1.getText();
        if ((str_j != null) && (!str_j.equals(""))) {
            _interim_num = Integer.valueOf(str_j);
        }
        return _interim_num;

    }

    private int _calcInterim() {

        int referee_num = getJudgesNumSelected();
        int _interim_num = Logic.DEF_INTERIM_NUM;
        if (referee_num == 1) {
            _interim_num = 1;
        } else if (referee_num == 2) {
            _interim_num = 2;
        } else if (referee_num == 3) {
            _interim_num = 2;
        } else if (referee_num == 4) {
            _interim_num = 3;
        }
        this.interim_num = _interim_num;
        jTextFieldJudges1.setText("" + _interim_num);
        return _interim_num;
    }

    private int _calcJudgesNum() {
        int judges_num = getJudgesNumSelected();
        if (judges_num <= 0) {
            List list = TkdGlobal._getGamepadsList();
            int limit = 4;
            int pads_num = 0;
            if (list != null) {
                pads_num = list.size();
            }
            if (pads_num > 0) {
                judges_num = getMin(pads_num, limit);
            }
        }
        if (judges_num <= 0) {
            judges_num = Logic.DEF_JUDGES_NUM;
        }
        return judges_num;
    }

    private void updateSquareGui() {
        // int num = getJudgesNum();
        //altro...
    }

    private void setMatchGuiEnabled(boolean b) {
        jTextFieldRounds.setEnabled(b);
        jTextFieldRoundCurrTimeMm.setEnabled(b);
        jTextFieldRoundCurrTimeSs.setEnabled(b);
        jTextFieldCurrRound.setEnabled(b);
        jTextFieldRoundTimeMm.setEnabled(b);
        jTextFieldRoundTimeSs.setEnabled(b);
        jTextFieldMatchId.setEnabled(b);
        jTextFieldMatchName.setEnabled(b);
        jTextFieldBreakTime.setEnabled(b);
        jTextFieldBreakTime1.setEnabled(b);
    }

    private void updateButtons(int type) {

        if (type == STATUS_STOPPED) {

            jButtonStartTimer.setEnabled(true);
            jButtonStopTimer.setEnabled(false);
            jButtonPauseTimer.setEnabled(false);
            jButtonResetTimer.setEnabled(true);

            jButtonStartMatch.setEnabled(true);
            jButtonStopMatch.setEnabled(false);
            jButtonPauseMatch.setEnabled(false);
            jButtonResetMatch.setEnabled(true);

        } else if (type == STATUS_FIGHTING) {

            jButtonStartTimer.setEnabled(false);
            jButtonStopTimer.setEnabled(true);
            jButtonPauseTimer.setEnabled(true);
            jButtonResetTimer.setEnabled(false);

            jButtonStartMatch.setEnabled(false);
            jButtonStopMatch.setEnabled(true);
            jButtonPauseMatch.setEnabled(true);
            jButtonResetMatch.setEnabled(false);

        } else if (type == STATUS_BREAKTIME) {

            jButtonStartTimer.setEnabled(true);
            jButtonStopTimer.setEnabled(false);
            jButtonPauseTimer.setEnabled(false);
            jButtonResetTimer.setEnabled(true);

            jButtonStartMatch.setEnabled(true);
            jButtonStopMatch.setEnabled(false);
            jButtonPauseMatch.setEnabled(false);
            jButtonResetMatch.setEnabled(true);
        }


    }

    private void setJudgesGuiEnabled(boolean b) {
        jTextFieldJudges.setEnabled(b);
        jTextFieldJudges1.setEnabled(b);
        jTextFieldValidityTime.setEnabled(b);
        jTextFieldValidityTime1.setEnabled(b);
    }

    private void setPlayerGuiEnabled(boolean b) {
        jTextFieldBlue1.setEnabled(b);
        jTextFieldRed1.setEnabled(b);
        jTextFieldRedName.setEnabled(b);
        jTextFieldBlueName.setEnabled(b);
    }

    private void bindRefereeAndHardware() {
        if (this.mapController != null) {
            Iterator it1 = combos.iterator();
            this.mapRefereeHw = new HashMap();
            int i = 1;
            while (it1.hasNext()) {
                try {
                    JComboBox combo = (JComboBox) it1.next();
                    Integer index = combo.getSelectedIndex();
                    Integer controller_id = (Integer) this.mapController.get(index);
                    this.mapRefereeHw.put(new Integer(i), controller_id);
                    i++;
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    }

    private void _initHwGui() {
        _fillControllersInfo();

        List list = TkdGlobal._getGamepadsList();
        if (list != null) {
            List list2 = new ArrayList();
            this.mapController = new HashMap();
            Iterator iter = list.iterator();
            int i = 0;
            while (iter.hasNext()) {
                try {
                    List data = (List) iter.next();
                    String name = (String) data.get(0);
                    Type type = (Type) data.get(1);
                    Integer controller_id = (Integer) data.get(2);
                    Integer port_number = (Integer) data.get(3);

                    this.mapController.put(new Integer(i), controller_id);
                    String desc = name + " - " + type + " - " + controller_id + " - " + port_number;
                    list2.add(desc);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                i++;
            }

            Iterator iterCombo = this.combos.iterator();
            while (iterCombo.hasNext()) {
                JComboBox combo = (JComboBox) iterCombo.next();
                Iterator iter2 = list2.iterator();
                while (iter2.hasNext()) {
                    String desc = (String) iter2.next();
                    combo.addItem(desc);
                }

            }
        } // end iff
    }

    private void comboSetSelectedIndex(JComboBox combo, String str_index) {
        if (str_index != null) {
            Integer index = Integer.valueOf(str_index);
            int n = combo.getItemCount();
            if (n > index.intValue()) {
                combo.setSelectedIndex(index);
            }
        }
    }

    private String getTimestampToLog() {
        Date d = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss.SSS");
        String timestamp = formatter.format(d.getTime());
        return timestamp;
    }

    private void addLogToTextArea(String str) {
        String txt = jTextArea2.getText();
        txt = txt + "\r\n" + str;
        jTextArea2.setText(txt);
    }

    private String getMatchToLog() {
        String str = jTextFieldMatchName.getText();
        return str;
    }

    private String getRoundToLog() {
        String str = jTextFieldCurrRound.getText();
        return str;
    }

    private String getMatchTime() {
        String mm = jTextFieldRoundCurrTimeMm.getText();
        String ss = jTextFieldRoundCurrTimeSs.getText();
        String str = mm + ":" + ss;
        return str;
    }

    public String getRoundMm() {
        String str = jTextFieldRoundTimeMm.getText();
        return str;
    }

    public String getRoundSs() {
        String str = jTextFieldRoundTimeSs.getText();
        return str;
    }

    private String getSubjectToLog(int player) {
        String str = null;
        if (player == Logic.RED) {
            String red_name = jTextFieldRedName.getText();
            if (isEmpty(red_name)) {
                str = "Red player";
            } else {
                str = red_name + " (red)";
            }
        } else if (player == Logic.BLUE) {
            String blue_name = jTextFieldRedName.getText();
            if (isEmpty(blue_name)) {
                str = "Blue player";
            } else {
                str = blue_name + " (blue)";
            }
        }
        return str;
    }

    private String getControllerToLog(int hw_index) {
        Integer controller_id1 = new Integer("0");
        Object a = this.mapRefereeHw.get(hw_index);
        if(a!=null){
        controller_id1 = (Integer) a;
        }
        Integer controller_id2 = new Integer("0");
        Object b = this.mapController.get(hw_index);
        if(b!=null){
           controller_id2 = (Integer) b;
        }                
        String str = "<id1 = " + controller_id1 + " id2 = " + controller_id2 + ">";
        return str;
    }

    private String getRefereeToLog(int hw_index) {
        String str = "n.d.";
        return str;
    }

    private void clearQueue(int player) {
        if (player == Logic.RED) {
            redQueue = new ArrayList();
        } else if (player == Logic.BLUE) {
            blueQueue = new ArrayList();
        }
    }

    private void addToQueue(int player, List list) {
        if (player == Logic.RED) {
            redQueue.add(list);
        } else if (player == Logic.BLUE) {
            blueQueue.add(list);
        }
    }

    private void clearQueues() {
        redQueue = new ArrayList();
        blueQueue = new ArrayList();
    }

    private int checkQueue(int player) {

        int r = 0;

        Integer point_lease_time = getLeaseTime();

        List list = null;
        if (player == Logic.RED) {
            list = redQueue;
        } else if (player == Logic.BLUE) {
            list = blueQueue;
        }
        int interim = getInterimFromCache();

        long time = (new Date()).getTime();
        boolean bContinue = true;
        int index = list.size() - 1;
        Set setReadPoint1 = new HashSet();
        Set setReadPoint2 = new HashSet();
        Set setReadPoint3 = new HashSet();
        while ((bContinue) || (index > 0)) {
            List data = (List) list.get(index);
            Integer points = (Integer) data.get(0);
            Integer hw_index = (Integer) data.get(1);
            Long time_past = (Long) data.get(2);

            long delta_time = time - time_past.longValue();
            if (delta_time < point_lease_time) {

                System.out.println("delta_time < point_lease_time");

                if (points == 1) {
                    setReadPoint1.add(hw_index);
                    if (setReadPoint1.size() >= interim) {
                        r = 1;
                        bContinue = false;
                    }
                } else if (points == 2) {
                    setReadPoint2.add(hw_index);
                    if (setReadPoint2.size() >= interim) {
                        r = 2;
                        bContinue = false;
                    }
                } else if (points == 3) { // NOT USED because 3 points was assembled with 2+1
                    setReadPoint3.add(hw_index);
                    if (setReadPoint3.size() >= interim) {
                        r = 3;
                        bContinue = false;
                    }
                }

            } else {
                System.out.println("delta_time > point_lease_time");
                bContinue = false;
            }
            index = index - 1;
        }

        if (r > 0) {
            addPoint(player, r);
        }
        return r;
    }

    private void printOnStatusbar(String string) {
        statusMessageLabel.setText(string);
    }

    private void log(String string) {
        addLogToTextArea(string);
    }

    private void setClockToolbarEnabled(boolean b) {
        jButtonStartTimer.setEnabled(b);
        jButtonStopTimer.setEnabled(b);
        jButtonPauseTimer.setEnabled(b);
        jButtonResetTimer.setEnabled(b);
    }

    private Integer toInteger(String str) {
        Integer a = new Integer(0);
        if ((str != null) && (str.length() > 0)) {
            try {
                a = Integer.valueOf(str);
            } catch (Exception e) {
                System.out.println("str is " + str + " size is " + str.length());
                e.printStackTrace();
            }

        }
        return a;
    }

    private int getInterimFromCache() {
        return this.interim_num;
    }

    private int getJudgesNumFromCache() {
        return this.referees_count;
    }

    private void applyButtonsConfig() {

        String button_r1 = jTextFieldR1.getText();
        String button_r2 = jTextFieldR2.getText();
        String button_r3 = jTextFieldR3.getText();
        String button_r4 = jTextFieldR4.getText();
        String button_short1 = jTextFieldShort1.getText();
        String button_short2 = jTextFieldShort2.getText();
        String button_short3 = jTextFieldShort3.getText();
        String button_short4 = jTextFieldShort4.getText();

        KeyMapping.CONFIG_LEFT_BOTTOM = TkdGlobal.toInt(button_r1);
        KeyMapping.CONFIG_LEFT_TOP = TkdGlobal.toInt(button_r2);
        KeyMapping.CONFIG_RIGHT_BOTTOM = TkdGlobal.toInt(button_r3);
        KeyMapping.CONFIG_RIGHT_TOP = TkdGlobal.toInt(button_r4);
        KeyMapping.CONFIG_SHORTCUT_1 = TkdGlobal.toInt(button_short1);
        KeyMapping.CONFIG_SHORTCUT_2 = TkdGlobal.toInt(button_short2);
        KeyMapping.CONFIG_SHORTCUT_3 = TkdGlobal.toInt(button_short3);
        KeyMapping.CONFIG_SHORTCUT_4 = TkdGlobal.toInt(button_short4);


    }

    private void applyColorConfig(int index) {
        if (index > -1) {
            if (index == 0) {
                Color c = new Color(236, 233, 216);
                jLabelRedPoint.setBackground(c);
                jLabelRedPoint.setForeground(Color.red);
                jLabelRedPoint.setOpaque(true);
                jLabelBluePoint.setBackground(c);
                jLabelBluePoint.setForeground(Color.blue);
                jLabelBluePoint.setOpaque(true);
                jPanelBoardScoreSouth.setBackground(c);
                jLabelTime.setOpaque(true);
                jLabelTime.setBackground(c);
                jLabelTime.setForeground(Color.black);
            } else if (index == 1) {
                jLabelRedPoint.setBackground(Color.red);
                jLabelRedPoint.setForeground(Color.white);
                jLabelRedPoint.setOpaque(true);
                jLabelBluePoint.setBackground(Color.blue);
                jLabelBluePoint.setForeground(Color.white);
                jLabelBluePoint.setOpaque(true);
                jPanelBoardScoreSouth.setBackground(Color.black);
                jLabelTime.setOpaque(true);
                jLabelTime.setBackground(Color.black);
                jLabelTime.setForeground(Color.white);

            } else if (index == 2) {
                jLabelRedPoint.setBackground(Color.black);
                jLabelRedPoint.setForeground(Color.red);
                jLabelRedPoint.setOpaque(true);
                jLabelBluePoint.setBackground(Color.black);
                jLabelBluePoint.setForeground(Color.blue);
                jLabelBluePoint.setOpaque(true);
                jPanelBoardScoreSouth.setBackground(Color.black);
                jLabelTime.setOpaque(true);
                jLabelTime.setBackground(Color.black);
                jLabelTime.setForeground(Color.white);

            } else if (index == 3) {
                jLabelRedPoint.setBackground(Color.white);
                jLabelRedPoint.setForeground(Color.red);
                jLabelRedPoint.setOpaque(true);
                jLabelBluePoint.setBackground(Color.white);
                jLabelBluePoint.setForeground(Color.blue);
                jLabelBluePoint.setOpaque(true);
                jPanelBoardScoreSouth.setBackground(Color.white);
                jLabelTime.setOpaque(true);
                jLabelTime.setBackground(Color.white);
                jLabelTime.setForeground(Color.black);

            }
        }
    }

    public void setClockFontSize(int size) {
        Font curFont = jLabelTime.getFont();
        jLabelTime.setFont(new Font(curFont.getFontName(), curFont.getStyle(), size));
    }

    public Integer getLeaseTime() {
        Integer point_lease_time = 0;
        String str = jTextFieldValidityTime.getText();
        if ((str != null) && (!str.equals(""))) {
            point_lease_time = Integer.valueOf(str);
        }
        return point_lease_time;
    }

    private boolean isEmpty(String str) {
        boolean b = false;
        if ((str == null) || (str.length() == 0)) {
            b = true;
        }
        return b;
    }

    public void startClock() {
        clock.start();
    }

    public void stopClock() {
        clock.stop();
    }

    public void pauseClock() {
        clock.pause();
    }

    private void checkConfig() {
        int _referees_count = getJudgesNumSelected();
        int _interim_num = getInterimNumSelected();
        int delta = _referees_count - _interim_num;
        

        if (_referees_count <= 0) {
            // String msg2 = "Warning: referees number is 0. It will be recalculated from" + "\r\n" + "the number of hardware devices installed.";
            String msg2 = "Warning: judges number is 0.";
            JOptionPane.showMessageDialog(this.getFrame(),
                    msg2,
                    "Warning message",
                    JOptionPane.WARNING_MESSAGE);
            //autoRefereesConfig();
        } else if (_referees_count > Logic.MAX_JUDGES_NUM) {
            String msg2 = "Warning: max judges number for this version is " + Logic.MAX_JUDGES_NUM + "." + "\r\n" + "Limit comes from the number of hardware devices which could be connected.";
            JOptionPane.showMessageDialog(this.getFrame(),
                    msg2,
                    "Warning message",
                    JOptionPane.WARNING_MESSAGE);
            autoRefereesConfig();
        }

        delta = this.referees_count - _interim_num; // recalc delta
        String msg = null;
                boolean recalc = false;
        if (_referees_count > 0) {
        if (this.interim_num > this.referees_count) {
            msg = "Erorr: Interim value is greater than judges number.";
            recalc = true;
        } else if (this.interim_num <= 0) {
            msg = "Error: Interim value is not valid.";
            recalc = true;
        } else if ((delta == 0) && (this.referees_count > 2)) {
            msg = "Warning: Interim value is set for unanimous opinion."; // giudizio unanime
        } else if (this.interim_num < (this.referees_count / 2)) {
            msg = "Warning: Interim value is set for minority opinion."; // giudizio di minoranza
            recalc = true;
        }
        }
        
        if (msg != null) {
            if (recalc) {
                msg = msg + "\r\n" + "It will be recalculated";
                autoIntermiConfig();
                JOptionPane.showMessageDialog(this.getFrame(),
                        msg,
                        "Warning message",
                        JOptionPane.WARNING_MESSAGE);
            }
        }

    }

    private void autoIntermiConfig() {
        int _interim = _calcInterim();
        this.interim_num = _interim;
        jTextFieldJudges1.setText("" + this.interim_num);
    }

    private void autoRefereesConfig() {
        int j_num = _calcJudgesNum();
        if (j_num == 0) {
            j_num = Logic.DEF_JUDGES_NUM;
        } else if (j_num > Logic.MAX_JUDGES_NUM) {
            j_num = Logic.MAX_JUDGES_NUM;
        }
        this.referees_count = j_num;
        jTextFieldJudges.setText("" + this.referees_count);
    }

    private int getJudgesNumSelected() {
        int j_num = 0;
        String str_j = jTextFieldJudges.getText();
        if ((str_j != null) && (!str_j.equals(""))) {
            j_num = Integer.valueOf(str_j);
        }
        return j_num;
    }
} // end class

